From ee94dc4bdba3fd5b0458bfd61f5638444a379618 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 23 Apr 2016 19:24:08 +0200 Subject: split vimrc in different files and added/reordered configuration --- .vim/vimrc_files/colors.vim | 1 + .vim/vimrc_files/functions.vim | 18 ++++++++++++++++ .vim/vimrc_files/highlight.vim | 10 +++++++++ .vim/vimrc_files/keymaps.vim | 49 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 .vim/vimrc_files/colors.vim create mode 100644 .vim/vimrc_files/functions.vim create mode 100644 .vim/vimrc_files/highlight.vim create mode 100644 .vim/vimrc_files/keymaps.vim (limited to '.vim/vimrc_files') diff --git a/.vim/vimrc_files/colors.vim b/.vim/vimrc_files/colors.vim new file mode 100644 index 0000000..678e440 --- /dev/null +++ b/.vim/vimrc_files/colors.vim @@ -0,0 +1 @@ +hi x226_Yellow1 ctermfg=226 guifg=#ffff00 "rgb=255,255,0 diff --git a/.vim/vimrc_files/functions.vim b/.vim/vimrc_files/functions.vim new file mode 100644 index 0000000..a2c0f9a --- /dev/null +++ b/.vim/vimrc_files/functions.vim @@ -0,0 +1,18 @@ +" Split Window and scroll down +fu! SplitScroll() + :wincmd v + :wincmd w + execute "normal! \" + :set scrollbind + :wincmd w + :set scrollbind +endfu + +" toggle relative line number mode +function! ToggleRelativeNumber() + if(&relativenumber == 1) + set norelativenumber + else + set relativenumber + endif +endfunc diff --git a/.vim/vimrc_files/highlight.vim b/.vim/vimrc_files/highlight.vim new file mode 100644 index 0000000..768708e --- /dev/null +++ b/.vim/vimrc_files/highlight.vim @@ -0,0 +1,10 @@ +" hi clear CursorLine +" augroup CLClear +" autocmd! ColorScheme * hi clear CursorLine +" augroup END + +" Highlight color of current line +hi CursorLineNR cterm=bold ctermfg=226 +augroup CLNRSet + autocmd! ColorScheme * hi CursorLineNR cterm=bold ctermfg=226 +augroup END diff --git a/.vim/vimrc_files/keymaps.vim b/.vim/vimrc_files/keymaps.vim new file mode 100644 index 0000000..75dffca --- /dev/null +++ b/.vim/vimrc_files/keymaps.vim @@ -0,0 +1,49 @@ +let ArrowDisableMessage = "Arrow Keys disabled! Better learn hjkl ;)" + +" Disable arrow keys -- train jklh +nnoremap :echo ArrowDisableMessage +nnoremap :echo ArrowDisableMessage +nnoremap :echo ArrowDisableMessage +nnoremap :echo ArrowDisableMessage + +vnoremap :echo ArrowDisableMessage +vnoremap :echo ArrowDisableMessage +vnoremap :echo ArrowDisableMessage +vnoremap :echo ArrowDisableMessage + +inoremap :echo ArrowDisableMessage +inoremap :echo ArrowDisableMessage +inoremap :echo ArrowDisableMessage +inoremap :echo ArrowDisableMessage + +" ctrl-jklm move to different splits +map j +map k +map l +map h + +" ctrl-hjkl move in insert mode +inoremap +inoremap +inoremap +inoremap + +" ctrl-jk movement in command window +cnoremap +cnoremap +cnoremap +cnoremap + +" shift-hl change to left/right Tab +nnoremap :tabprev +nnoremap :tabnext + +" ctrl-ae jump to line start/end +nnoremap 0 +nnoremap $d + +inoremap 0 +inoremap $ + +" Shortcut to toggle relative numbering mode +nnoremap :call ToggleRelativeNumber() -- cgit v1.2.3