1
1
Fork 0
dotfiles/nvim/init.vim
2021-04-08 09:35:18 -05:00

48 lines
1 KiB
VimL

" - Config -
"" Encoding
set encoding=utf8
"" Disable modeline
set nomodeline
"" System undo levels
set undofile
set undolevels=100
"" Indenting
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
"" Disable error sounds
set noerrorbells
"" Stop word wrapping
set nowrap
"" Show invisible characters
set conceallevel=1
"" Enable search highlighting
set hlsearch
"" Line Numbers
set number relativenumber
"" Top/Bottom scroll padding
set scrolloff=3
set sidescrolloff=5
"" Enable autoread if file changes
set autoread
"" Hide Buffers
set hidden
"" Statusline
set laststatus=0
" - Mappings -
"" Map Leader to spacebar
let mapleader=" "
"" Shortcut to save
nnoremap <Leader>w :w<CR>
"" Moving current lines up/down
nnoremap <Leader>k :<c-u>execute 'move -1-'. v:count1<cr>
nnoremap <Leader>j :<c-u>execute 'move +'. v:count1<cr>
"" Buffers Next/Previous
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprev<CR>
"" Shortcut to close buffer
nnoremap <Esc><Esc> :bd<CR>
"" Shortcut to reopen closed buffer
nmap <Leader><Leader> <c-^>