summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
Diffstat (limited to '.vim')
-rw-r--r--.vim/vimrc_files/colors.vim1
-rw-r--r--.vim/vimrc_files/functions.vim18
-rw-r--r--.vim/vimrc_files/highlight.vim10
-rw-r--r--.vim/vimrc_files/keymaps.vim49
4 files changed, 78 insertions, 0 deletions
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! \<C-d>"
+ :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 <Left> :echo ArrowDisableMessage<CR>
+nnoremap <Right> :echo ArrowDisableMessage<CR>
+nnoremap <Up> :echo ArrowDisableMessage<CR>
+nnoremap <Down> :echo ArrowDisableMessage<CR>
+
+vnoremap <Left> :<c-u>echo ArrowDisableMessage<CR>
+vnoremap <Right> :<c-u>echo ArrowDisableMessage<CR>
+vnoremap <Up> :<c-u>echo ArrowDisableMessage<CR>
+vnoremap <Down> :<c-u>echo ArrowDisableMessage<CR>
+
+inoremap <Left> <c-o>:echo ArrowDisableMessage<CR>
+inoremap <Right> <c-o>:echo ArrowDisableMessage<CR>
+inoremap <Up> <c-o>:echo ArrowDisableMessage<CR>
+inoremap <Down> <c-o>:echo ArrowDisableMessage<CR>
+
+" ctrl-jklm move to different splits
+map <c-j> <c-w>j
+map <c-k> <c-w>k
+map <c-l> <c-w>l
+map <c-h> <c-w>h
+
+" ctrl-hjkl move in insert mode
+inoremap <c-h> <Left>
+inoremap <c-j> <Down>
+inoremap <c-k> <Up>
+inoremap <c-l> <Right>
+
+" ctrl-jk movement in command window
+cnoremap <c-h> <Left>
+cnoremap <c-j> <Down>
+cnoremap <c-k> <Up>
+cnoremap <c-l> <Right>
+
+" shift-hl change to left/right Tab
+nnoremap <s-h> :tabprev<CR>
+nnoremap <s-l> :tabnext<CR>
+
+" ctrl-ae jump to line start/end
+nnoremap <c-a> 0
+nnoremap <c-e> $d
+
+inoremap <c-a> <c-o>0
+inoremap <c-e> <c-o>$
+
+" Shortcut to toggle relative numbering mode
+nnoremap <c-n> :call ToggleRelativeNumber()<CR>