summaryrefslogtreecommitdiff
path: root/.vim/vimrc
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 12:31:31 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 12:31:31 +0200
commit0808fe24e2a0723b67cc743171642a685dd9db68 (patch)
tree126b415ae9ba7b442dc13d160c734021a2929331 /.vim/vimrc
parent2a9a1dd57ced53c58d373268db52a8319bc5bb87 (diff)
downloaddotfiles-0808fe24e2a0723b67cc743171642a685dd9db68.tar.gz
Shortcuts
Diffstat (limited to '.vim/vimrc')
-rw-r--r--.vim/vimrc61
1 files changed, 46 insertions, 15 deletions
diff --git a/.vim/vimrc b/.vim/vimrc
index 19e575e..2fa11cc 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -1,3 +1,8 @@
+" ===========
+" VARIABLES
+" ===========
+
+
set nocompatible
"Disable bell
set vb
@@ -13,47 +18,73 @@ let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#whitespace#enabled = 1
let g:airline_powerline_fonts = 1
-"??let mapleader = ","
+" Use todo#Complete as the omni complete function for todo files
+au filetype todo setlocal omnifunc=todo#Complete
+
+" Auto complete projects
+au filetype todo imap <buffer> + +<C-X><C-O>
+
+" Auto complete contexts
+au filetype todo imap <buffer> @ @<C-X><C-O>
+
+" leader
+let mapleader = "-"
+let leader = "-"
+let maplocalleader = "-"
+
execute pathogen#infect()
syntax on
filetype plugin indent on
+"Line number Highlight
+set nu
+highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
+
+" ==============
+" SHORTCUTS
+" ==============
+
"Switch windows with keys
nmap <silent> <C-w-k> :wincmd k<CR>
nmap <silent> <C-w-j> :wincmd j<CR>
nmap <silent> <C-w-h> :wincmd h<CR>
nmap <silent> <C-w-l> :wincmd l<CR>
-nmap <silent> <C-m> :make<CR>
+nmap <silent> <F8> :make<CR>
nmap <silent> <F5> :NERDTreeToggle<CR>
nmap <silent> <F6> :TlistToggle<CR>
nmap <silent> <F7> :Newterm<CR>
-command -bar Newterm call Create_term()
-
-function Create_term()
- tabnew
- terminal
- startinsert
-endfunction
-
"Tab mgmt
nmap <silent> <F1> :tabclose<CR>
nmap <silent> <F2> :tabprevious<CR>
nmap <silent> <F3> :tabnext<CR>
nmap <silent> <F4> :tabnew<CR>
-"^] Jump to tag, ^t jump back
-command! MakeTags !ctags -R .
-"Line number Highlight
-set nu
-highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
+" ===========
+" COMMANDS
+" ===========
" Command HEXMODE
command -bar Hexmode call ToggleHex()
+"^] Jump to tag, ^t jump back
+command! MakeTags !ctags -R .
+
+command -bar Newterm call Create_term()
+
+" ===========
+" FUNCTIONS
+" ===========
+
+function Create_term()
+ tabnew
+ terminal
+ startinsert
+endfunction
+
" helper function to toggle hex mode
function ToggleHex()
" hex mode should be considered a read-only operation