Tip #347: Format paragraph without changing the cursor position
tip karma |
Rating 1/3, Viewed by 706
|
created: |
|
October 18, 2002 21:02 |
|
complexity: |
|
intermediate |
author: |
|
Kartik Agaram |
|
as of Vim: |
|
6.0 |
map <silent> <C-j> :let line=line(".")<CR>:let col=col(".")<CR>gqap:exec ":".line<CR>:exec "normal " . col . "\|"<CR>
imap <silent> <C-j> <Esc>:let line=line(".")<CR>:let col=col(".")<CR>gqap:exec ":".line<CR>:exec "normal " . col . "\|"<CR>a
<<Wrap text in HTML/XML tags after prompting for the tag name |
Quickly insert a single word >>
Additional Notes
|