Skip to content

make { and } in Vim jump to the beginning respectively end of the current paragraph

Notifications You must be signed in to change notification settings

Konfekt/vim-smartbraces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This Vim plug-in makes

  • the keys { and } jump to the beginning respectively to the end of the current paragraph (instead of the first empty line before respectively after it, by default), and
  • the key ) jump to the end of the current sentence (instead of the start of the next sentence).

Setup

If you prefer to use different key combinations instead, say g{, g} and g), add

nmap  g{  <Plug>(smartbraces-OpenBrace)
nmap  g}  <Plug>(smartbraces-CloseBrace)
xmap  g{  <Plug>(smartbraces-OpenBrace)
xmap  g}  <Plug>(smartbraces-CloseBrace)
omap  g{  <Plug>(smartbraces-OpenBrace)
omap  g}  <Plug>(smartbraces-CloseBrace)

nmap  g)  <Plug>(smartbraces-CloseParenthesis)
xmap  g)  <Plug>(smartbraces-CloseParenthesis)
omap  g)  <Plug>(smartbraces-CloseParenthesis)

to your vimrc.

If you prefer that the keys { and }, as well as ), jump to the beginning respectively to the end of the current paragraph, respectively sentence, only inside spellchecked buffers, but work as usual otherwise, add

  let g:smartbraces_spell = 1

to your vimrc.

About

make { and } in Vim jump to the beginning respectively end of the current paragraph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published