Put vim keybindings below settings

This commit is contained in:
2020-09-13 19:26:50 +02:00
parent 54214d09d7
commit 746dc36c07

View File

@@ -7,23 +7,6 @@ packadd! onedark.vim
" Git information
packadd! vim-gitgutter
" Keybinds #####################################################################
" Set leader key
let mapleader = "\<Space>"
" Stop highlighting search result when pressing Return
nnoremap <silent> <CR> :nohlsearch<CR><CR>
" Indentation jump
" https://vim.fandom.com/wiki/Move_to_next/previous_line_with_same_indentation
noremap <silent> <C-k> :call search('^'. matchstr(getline('.'), '\(^\s*\)') .'\%<' . line('.') . 'l\S', 'be')<CR>
noremap <silent> <C-j> :call search('^'. matchstr(getline('.'), '\(^\s*\)') .'\%>' . line('.') . 'l\S', 'e')<CR>
" Split view navigation
nnoremap <leader>h <C-w><C-h>
nnoremap <leader>j <C-w><C-j>
nnoremap <leader>k <C-w><C-k>
nnoremap <leader>l <C-w><C-l>
" Settings #####################################################################
" hybrid linenumbers
set number relativenumber
@@ -53,6 +36,23 @@ endif
" Put new window below/right of current
set splitbelow splitright
" Keybinds #####################################################################
" Set leader key
let mapleader = "\<Space>"
" Stop highlighting search result when pressing Return
nnoremap <silent> <CR> :nohlsearch<CR><CR>
" Indentation jump
" https://vim.fandom.com/wiki/Move_to_next/previous_line_with_same_indentation
noremap <silent> <C-k> :call search('^'. matchstr(getline('.'), '\(^\s*\)') .'\%<' . line('.') . 'l\S', 'be')<CR>
noremap <silent> <C-j> :call search('^'. matchstr(getline('.'), '\(^\s*\)') .'\%>' . line('.') . 'l\S', 'e')<CR>
" Split view navigation
nnoremap <leader>h <C-w><C-h>
nnoremap <leader>j <C-w><C-j>
nnoremap <leader>k <C-w><C-k>
nnoremap <leader>l <C-w><C-l>
" Aesthetics ###################################################################
" Use 24-bit (true-color) mode
if (has('termguicolors'))