mirror of
https://github.com/mikkelsvartveit/dotfiles.git
synced 2025-12-22 19:22:38 +00:00
48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
let mapleader = ","
|
|
|
|
" Disable bell sounds
|
|
set visualbell
|
|
|
|
" Enable relative line numbers
|
|
set number
|
|
set relativenumber
|
|
|
|
" Show search results as you type
|
|
set incsearch
|
|
|
|
" Highlight search results
|
|
set hlsearch
|
|
|
|
" This setting makes search case-insensitive when all characters in the string
|
|
" being searched are lowercase. However, the search becomes case-sensitive if
|
|
" it contains any capital letters. This makes searching more convenient.
|
|
set ignorecase
|
|
set smartcase
|
|
|
|
" Always show 4 lines above and below the cursor
|
|
set scrolloff=4
|
|
|
|
" Press Enter to clear search highlighting
|
|
nmap <CR> :nohlsearch<CR>
|
|
|
|
" Allow using uppercase W and Q commands to save/quit
|
|
command WQ wq
|
|
command Wq wq
|
|
command W w
|
|
command Q q
|
|
|
|
" Enable plugins
|
|
Plug 'preservim/nerdtree'
|
|
Plug 'tpope/vim-surround'
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
" Keymaps
|
|
nnoremap gh :action ShowErrorDescription<CR>
|
|
nnoremap gf :action QuickJavaDoc<CR>
|
|
nnoremap <leader>n :NERDTree<CR>
|
|
nnoremap <leader>c :action GotoAction<CR>
|
|
nnoremap <leader>: :action GotoAction<CR>
|
|
nnoremap <leader>p :action GotoFile<CR>
|
|
nnoremap <leader>o :action RecentFiles<CR>
|
|
nnoremap <leader>f :action FindInPath<CR>
|
|
nnoremap <leader>d :action ActivateCommitToolWindow<CR>
|