2012-01-26 02:35:34 +08:00
|
|
|
" http://vimcasts.org/episodes/soft-wrapping-text/
|
|
|
|
function! SetupWrapping()
|
|
|
|
set wrap linebreak nolist
|
|
|
|
set showbreak=…
|
|
|
|
endfunction
|
|
|
|
|
2012-01-26 02:37:09 +08:00
|
|
|
" TODO: this should happen automatically for certain file types (e.g. markdown)
|
2012-01-26 02:35:34 +08:00
|
|
|
command! -nargs=* Wrap :call SetupWrapping()<CR>
|
|
|
|
|
|
|
|
vmap <D-j> gj
|
|
|
|
vmap <D-k> gk
|
2012-01-26 10:09:33 +08:00
|
|
|
vmap <D-$> g$
|
|
|
|
vmap <D-^> g^
|
2012-01-26 02:35:34 +08:00
|
|
|
vmap <D-0> g^
|
|
|
|
nmap <D-j> gj
|
|
|
|
nmap <D-k> gk
|
2012-01-26 10:09:33 +08:00
|
|
|
nmap <D-$> g$
|
|
|
|
nmap <D-^> g^
|
2012-01-26 02:35:34 +08:00
|
|
|
nmap <D-0> g^
|
|
|
|
|