infra/configuration/common/pkg/vim.nix
2016-03-05 18:46:58 +01:00

76 lines
2 KiB
Nix

{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(vim_configurable.customize {
name = "vim";
# add custom .vimrc lines like this:
vimrcConfig.customRC = ''
set hidden
syntax on
" set hlsearch
set number
" mappings to stop insert mode
imap jjj <ESC>
imap kkk <ESC>
imap lll <ESC>
imap hhh <ESC>
set scroll=11
noremap <C-n> :tabn<CR>
noremap <C-p> :tabp<CR>
let g:ctrlp_map = '<tab>'
set wildignore+=*/site/*,*.so,*.swp,*.zip
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn|)$$',
\ 'file': '\v\.(exe|so|dll)$$',
\ }
let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict'
set ls=2 " allways show status line
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
"set textwidth=80
" GoDef mappings
au FileType go nmap <Leader>gds <Plug>(go-def-split)
au FileType go nmap <Leader>gdv <Plug>(go-def-vertical)
au FileType go nmap <Leader>gdt <Plug>(go-def-tab)
" syntastic
" au FileType qf setlocal wrap linebreak
" let g:syntastic_always_populate_loc_list = 1
" let g:syntastic_auto_loc_list = 0
" let g:syntastic_check_on_open = 1
" let g:syntastic_check_on_wq = 0
'';
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; # optional
vimrcConfig.vam.pluginDictionaries = [{
# full ducomentation at github.com/MarcWeber/vim-addon-manager
names = [
"youcompleteme"
"vim-airline"
"vim-addon-nix"
"ctrlp"
"vim-go"
"vim-colorschemes"
# "syntastic"
# "ag.vim"
# "gosu-colors"
# "tagbar"
# "molokai"
];
}
];
})
python
];
}