2 new commands (Todo & Fixme) + mapping fixes

This commit is contained in:
Talia 2017-10-26 13:24:02 +02:00
parent 3eea5c99c9
commit 0cb716e650

9
vimrc
View file

@ -90,6 +90,9 @@ noremap <leader>x x
" === GENERAL COMMANDS === " === GENERAL COMMANDS ===
command! L lopen | set number | set norelativenumber command! L lopen | set number | set norelativenumber
command! Fixme cex MatchingLines("\\cfixme.*")
command! Todo cex MatchingLines("\\ctodo.*")
" === GENERAL KEY MAPPINGS === " === GENERAL KEY MAPPINGS ===
let mapleader = "\\" let mapleader = "\\"
nnoremap <S-l> :L<cr> nnoremap <S-l> :L<cr>
@ -104,8 +107,8 @@ nnoremap <C-n> :bnext<CR>
nnoremap <C-p> :bprevious<CR> nnoremap <C-p> :bprevious<CR>
nnoremap <leader>n :lnext<cr> nnoremap <leader>n :lnext<cr>
nnoremap <leader>p :lNext<cr> nnoremap <leader>p :lNext<cr>
nnoremap <leader>cn :cnext<cr> nnoremap <leader><leader>n :cnext<cr>
nnoremap <leader>cp :cNext<cr> nnoremap <leader><leader>p :cNext<cr>
nnoremap <C-i> Bi <esc>i nnoremap <C-i> Bi <esc>i
nnoremap <C-a> Ea <esc>a nnoremap <C-a> Ea <esc>a
" This one does nothing, but I'm adding it to remember not to remap the tab key " This one does nothing, but I'm adding it to remember not to remap the tab key
@ -127,7 +130,7 @@ nnoremap <leader>: :let @* = @:<CR>
" Tabs vs. Spaces " Tabs vs. Spaces
nnoremap <C-tab> :setl expandtab!<CR>:set expandtab?<CR> nnoremap <C-tab> :setl expandtab!<CR>:set expandtab?<CR>
" todo: custom function to retab only indentation " TODO: custom function to retab only indentation
" Empty Lines " Empty Lines
nnoremap <ENTER> :call <SID>Enter(0)<CR> nnoremap <ENTER> :call <SID>Enter(0)<CR>