1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-10-31 18:01:30 +01:00
dotfiles/vim/vimrc

60 lines
1.5 KiB
VimL
Raw Normal View History

2020-12-06 02:29:15 +01:00
" Install all plugins
source $DOTFILES/vim/plugs.vim
" Sanity
set encoding=utf-8
scriptencoding utf-8
" Style
set background=dark
colorscheme gruvbox
" General stuff
set nowrap
set mouse=a
set relativenumber number
set foldlevelstart=3 foldmethod=syntax nofoldenable "without nofoldenable all folds are closed at startup"
set ttymouse=xterm2 " fix mouse when used in tmux/byobu https://unix.stackexchange.com/q/50733
2020-12-07 15:37:55 +01:00
set nobackup nowb noswapfile " no need for backups of every file
2020-12-06 02:29:15 +01:00
set history=10000
set list listchars=tab:\ ,trail:•,extends:#,nbsp:.
set splitbelow splitright
set autoread
" Don't redraw while executing macros (good performance config)
set lazyredraw
set ignorecase smartcase " ignore case on search but be smart about it
set hlsearch "highlight search results (using *)
set shiftwidth=4 tabstop=4
autocmd FileType yaml,yml setlocal shiftwidth=2 softtabstop=2 expandtab
2020-12-06 23:20:21 +01:00
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
2020-12-06 02:29:15 +01:00
" Return to last edit position when opening files (from amix's vimrc)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Remap VIM 0 to first non-blank character
" map 0 ^
" Bash like keys for the command line
cnoremap <C-A> <Home>
cnoremap <C-E> <End>
cnoremap <C-K> <C-U>
cnoremap <C-P> <Up>
cnoremap <C-N> <Down>
try
set undodir=~/.vim/temp_dirs/undodir
set undofile
catch
endtry
source $DOTFILES/vim/plugins_config.vim
source $DOTFILES/vim/shortcuts.vim
source $DOTFILES/vim/functions.vim