-
Formatting text in Vim
rencontres sérieuses à halluin The gq{motion} command will format a section of text. The ip motion selects the current paragraph, so gqip applies formatting to the current paragraph. Running the gq command moves the cursor to the end of the paragraph. If you want to keep the cursor on the same word, you can instead run the command gw.…
-
Moving easier around softwrapped text in VIM Put…
contiguously Moving easier around softwrapped text in VIM. Put this in the .vimrc. “Show elipsis for softwrapped lines ” Unicode for elipsis: ctrl-v v 2026 set showbreak=… “Moving softwrapped lines vmap gj vmap gk vmap g$ vmap g^ vmap g^ nmap gj nmap gk nmap g$ nmap g^ nmap g^ Adapted from http://vimcasts.org/episodes/soft-wrapping-text/
-
Showing the document statistics Select a text block…
Showing the document statistics Select a text block. g and Ctrl-g
-
Keep the cursor in the middle of the…
Keep the cursor in the middle of the screen in Vi set scrolloff=10 The command keeps the cursor in the area which is off 10 lines from the top and 10 lines from the bottom. If the number is big enough, then the cursor stays in the middle while typing. set so=100 The exception is…
-
Very nice summary of editing in vim Eff …
Very nice summary of editing in vim Efficient Editing with vim http://jmcpherson.org/editing.html
-
yank and put (copy and paste) between tw …
yank and put (copy and paste) between two gVim Use * instead of + e.g. yank: *y cut: *x put: “*gP On the other hand, use + to copy and paste to other programs yank: +y cut: +x paste: “+gP
-
Rewrapping in Vim gq or gw to stay…
Rewrapping in Vim gq or gw to stay at the word where the cursor was. It will re-wrap the text depending on the textwidth or windowmargin value.