vsc-dotfiles/init.vim

59 lines
1.0 KiB
VimL

" Display tab characters, trailing spaces and nbsp
set list
set listchars=tab:→\ ,trail:␣,nbsp:⋅
" Remove unnecessary stuff from bottom of window
set noruler
set laststatus=2
" Nice line numbers
set number
set relativenumber
" Spaces over tabs every day of the week (except in makefiles)
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set smartindent
" Window navigation shortcuts
nnoremap <c-h> <c-w>h
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
" ö for quick command access on Swedish keyboards
nnoremap ö :
" Some navigation shortcuts for Swedish keyboards
nnoremap - `
nmap Å [
nmap å ]
omap Å [
omap å ]
xmap Å [
xmap å ]
noremap ÅÅ [[
noremap åå ]]
nnoremap <space>, <c-^>
nnoremap <tab> %
" Some searching options
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
nnoremap <silent> <space> :noh<CR>
noremap / /\v
nnoremap * *N
noh
set hidden
" Uppercase last word on c-^
inoremap <C-]> <Esc>gUiw`]a
nnoremap <silent> § :NERDTreeToggle<CR>