Commits

j committed d8a77a5

Add vim commands for soft-wrapping and better beginning/end-of-line jumping

  • Participants
  • Parent commits b3772f8

Comments (0)

Files changed (1)

File etc/vim/vimrc

 " |                                                                           |
 " |   ,i = toggle invisibles                                                  |
 " |                                                                           |
+" |   :Wrap = soft-wraps current file                                         |
 " |   :w!! = sudo write changes to current file                               |
 " |                                                                           |
 " |   enter and shift-enter = adds a new line after/before the current line   |
 " Line Wrapping ***************************************************************
 set nowrap
 set linebreak  " Wrap at word
+command! -nargs=* Wrap set wrap linebreak nolist " Soft-wraps current file
 
 
 " Directories *****************************************************************
 set backspace=indent,eol,start
 set number " Show line numbers
 set matchpairs+=<:>
-set vb t_vb= " Turn off bell, this could be more annoying, but I'm not sure how
+set vb t_vb= " Turn off bell: this could be more annoying, but I'm not sure how
 set nofoldenable " Turn off folding 
 
 
 map <Leader>p <C-^> " Go to previous file
 
 
+" Improve beginning/end-of-line jumping since I don't use default H/L behavior
+noremap H ^
+noremap L g_
+
+
 
 " -----------------------------------------------------------------------------  
 " |                                 Bundles                                   |
 " NERD Commenter **************************************************************
 let NERDCreateDefaultMappings=0 " I turn this off to make it simple
 
-" Toggle commenting on 1 line or all selected lines. Wether to comment or not
+" Toggle commenting on 1 line or all selected lines. Whether to comment or not
 " is decided based on the first line; if it's not commented then all lines
 " will be commented
 :map <Leader>c :call NERDComment(0, "toggle")<CR>