Commits

esaurito committed 1c93782

Added some mappings

  • Participants
  • Parent commits e31bfba

Comments (0)

Files changed (2)

snippets/html.snippets

 	</table>${4}
 snippet textarea
 	<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}
+#Custom snippets
+snippet ul
+	<ul>
+	<li> ${1:First element} </li>
+	</ul>
+
 set smartindent " See help
 
 " 3. SCROLL
-set sidescrolloff=2
+set scrolloff=3 " start scrolling before cursor at end
 set numberwidth=4
+set nostartofline " don't jump to the start of line when scrolling
+" faster viewport scrolling
+nnoremap <C-e> 3<C-e>
+nnoremap <C-y> 3<C-y>
 
 " 4. WINDOWS
 set equalalways " Multiple windows, when created, are equal in size
 map <silent> <F9> :setlocal invspell<CR>
 imap <silent> <F9> <ESC>:setlocal invspell<CR>i
 
-" map :BufClose to :bq and configure it to open a file browser on close
+" map :BufClose to :bq and
 cnoreabbr <expr> bq 'BufClose' 
 
 " Quickly edit/reload the vimrc file
 nmap <silent> <leader>ev :e $MYVIMRC<CR>
 map <silent> <leader>sv :so $MYVIMRC<CR>
 
-
 "Toggle paste mode with a key
 set pastetoggle=<F2>
 
 vmap Q gq
 nmap Q gqap
 
-let g:miniBufExplMapCTabSwitchBufs = 1 " Switch between buffer with ctrl+tab
-
 " Fuzzy Finder
 map <leader>f :FufFile<CR>
 map <leader>d :FufDir<CR>
 
 noremap ,n :NERDTreeToggle<CR> " NerdTree
 
+" spell checking shortcuts (next, prev, add, suggest)
+map <LocalLeader>sn ]s
+map <LocalLeader>sp [s
+map <LocalLeader>sa zg
+map <LocalLeader>s? z=
+
+"  strip trailing whitespace
+map <LocalLeader>ks :%s/\s\+$//g<CR>
 
 " 10. OMNICOMPLETION
 autocmd FileType html :set omnifunc=htmlcomplete#CompleteTags
 let NERDTreeMouseMode=1
 
 " Mini Buffer Explorer
-let g:miniBufExplMapWindowNavVim = 1
 let g:miniBufExplMapWindowNavArrows = 1
-let g:miniBufExplModSelTarget = 1 
+let g:miniBufExplMapCTabSwitchBufs = 1 " Switch between buffer with ctrl+tab
+"let g:miniBufExplForceSyntaxEnable = 1
 
 " 13. SPECIAL MAPPINGS FOR WRAP MODE 
 "This need to be at the bottom of .vimrc