added function for wrapping text.

This commit is contained in:
Kyle West 2012-01-25 13:35:34 -05:00
parent fc2d9b6d64
commit 793554b5b3
2 changed files with 23 additions and 0 deletions

View File

@ -368,6 +368,10 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
* Cmd-/ - toggle comments (usually gcc from tComment) * Cmd-/ - toggle comments (usually gcc from tComment)
* gcp (comment a paragraph) * gcp (comment a paragraph)
**Wrapping**
* :Wrap - wrap long lines (e.g. when editing markdown files).
* Cmd-[j, k, $, 0, ^] - navigate display lines.
### Included vim plugins ### Included vim plugins

View File

@ -0,0 +1,19 @@
" http://vimcasts.org/episodes/soft-wrapping-text/
function! SetupWrapping()
set wrap linebreak nolist
set showbreak=
endfunction
command! -nargs=* Wrap :call SetupWrapping()<CR>
vmap <D-j> gj
vmap <D-k> gk
vmap <D-4> g$
vmap <D-6> g^
vmap <D-0> g^
nmap <D-j> gj
nmap <D-k> gk
nmap <D-4> g$
nmap <D-6> g^
nmap <D-0> g^