Put vim keybindings below settings
This commit is contained in:
@@ -7,23 +7,6 @@ packadd! onedark.vim
|
|||||||
" Git information
|
" Git information
|
||||||
packadd! vim-gitgutter
|
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 #####################################################################
|
" Settings #####################################################################
|
||||||
" hybrid linenumbers
|
" hybrid linenumbers
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
@@ -53,6 +36,23 @@ endif
|
|||||||
" Put new window below/right of current
|
" Put new window below/right of current
|
||||||
set splitbelow splitright
|
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 ###################################################################
|
" Aesthetics ###################################################################
|
||||||
" Use 24-bit (true-color) mode
|
" Use 24-bit (true-color) mode
|
||||||
if (has('termguicolors'))
|
if (has('termguicolors'))
|
||||||
|
|||||||
Reference in New Issue
Block a user