Tuesday, 15 January 2013

vim - make gvim treat wrapped line as new line -


When I press the down arrow in "j" or vim / gvim, the cursor goes to the next line to write the code that's good.

While writing the text, the lines are usually very long, with the text. So I can not easily get the word above the word, by pressing the up arrow in almost all editors and text processors. ↑ The cursor will be inserted in front of "cursor". But the cursor in gvim goes on the blank line between the "code". And "when"

I use wrap (set: wrap) and linebreak (set: LBR).

With all the powers of VIM - should it be straight forward?

g k and g j Instead of the text line, move up / down the line of sight you can use j and k / P>

  noremap j gj noremap k gk  

Some people just like to set up those maps for specific file types, in which case you want something < / P>

  au FileType html, tex noremap & lt; Buffer & gt; J gj au fileetype html, tex noremap & lt; Buffer & gt; K gk  

No comments:

Post a Comment