←back to thread

302 points Bogdanp | 2 comments | | HN request time: 0.488s | source
1. feelamee ◴[] No.44395117[source]
> Vim hangs when you open it

you can enable word wrapping as a workaround ( `:set wrap`). Lifehack: it can be hard to navigate in such file with just `h, j, k, l`, but you can use `gh, gj, etc`. With `g` vim will work with visual lines, while without it with just lines splitted with LF/CRLF

replies(1): >>44395348 #
2. mmh0000 ◴[] No.44395348[source]
With a little bit of vimrc magic you can make it transparent:

  "Make k/j up/down work more naturally by going to the next displayed line vs
  "going to the next logical line (for when word-wrapping is on):
  noremap k gk
  noremap j gj
  noremap <up> gk
  noremap <down> gj
  "Same as above, but for arrow keys in insert mode:
  inoremap <up> <Esc>gka
  inoremap <down> <Esc>gja