summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-19 12:20:19 +0200
committerAdrian Kummerlaender2018-05-19 12:20:19 +0200
commitda32211e2be61f9d9818dfc03f510d847fab1c69 (patch)
treea4cf3804df5e1a0c3f1d07bc1f350bb2a0a7863a
parent4f77b3dbc0c45d0f039bfdcf5c587b4fdf40a446 (diff)
downloadnixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar.gz
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar.bz2
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar.lz
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar.xz
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.tar.zst
nixos_system-da32211e2be61f9d9818dfc03f510d847fab1c69.zip
Update vim config
-rw-r--r--configuration.nix2
-rw-r--r--pkgs/vim/conf/rc.vim12
-rw-r--r--pkgs/vim/conf/vim-color-akr/colors/akr.vim4
-rw-r--r--pkgs/vim/custom.nix6
-rw-r--r--pkgs/vim/plugins.nix8
5 files changed, 24 insertions, 8 deletions
diff --git a/configuration.nix b/configuration.nix
index 7071009..f6aef5c 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -112,7 +112,7 @@
systemPackages = let
custom_vim = import ./pkgs/vim/vim.nix pkgs;
in with pkgs; [
- ntfs3g psmisc htop fish git silver-searcher custom_vim
+ hdparm ntfs3g psmisc htop fish git silver-searcher custom_vim
];
shellAliases = {
diff --git a/pkgs/vim/conf/rc.vim b/pkgs/vim/conf/rc.vim
index 6ad5d7b..fcd49b3 100644
--- a/pkgs/vim/conf/rc.vim
+++ b/pkgs/vim/conf/rc.vim
@@ -20,8 +20,6 @@ set directory=~/.vim/swap//,.
set wrap
set tabstop=4 shiftwidth=4
set backspace=indent,eol,start
-set listchars=tab:\ \
-set list
set linebreak
set hlsearch
@@ -29,6 +27,8 @@ set incsearch
set ignorecase
set smartcase
+set wildchar=<Tab> wildmenu wildmode=full
+
let mapleader=","
map <leader>s :let @/=""<CR>
@@ -50,6 +50,9 @@ autocmd FileType pandoc setlocal nonumber autoread
autocmd FileType pandoc let g:airline#extensions#whitespace#checks=['indent', 'trailing', 'long']
autocmd FileType tex set conceallevel=2
+nnoremap <C-Tab> :bnext<CR>
+nnoremap <C-S-Tab> :bprev<CR>
+
" select previous line on file reload, useful when cycling file extensions
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\" zz" | endif
nnoremap <Tab> :CounterpointNext<CR>
@@ -98,7 +101,8 @@ let g:goyo_width = 90
let g:goyo_margin_top = 1
let g:goyo_margin_bottom = 0
-nnoremap <F5> :UndotreeToggle<CR>
+nnoremap <F4> :call BufferList()<CR>
+nnoremap <F6> :UndotreeToggle<CR>
nnoremap <F6> :GitGutterToggle<CR>
nnoremap <F7> :TagbarToggle<CR>
nnoremap <F8> :Goyo<CR>
@@ -113,6 +117,8 @@ let g:ctrlp_custom_ignore = {
\ 'file': '\.o$\|\.d$'
\ }
+let g:ackprg = 'ag --vimgrep'
+
let g:undotree_SetFocusWhenToggle = 1
let g:tagbar_autoclose = 1
diff --git a/pkgs/vim/conf/vim-color-akr/colors/akr.vim b/pkgs/vim/conf/vim-color-akr/colors/akr.vim
index 127f022..8ff58d8 100644
--- a/pkgs/vim/conf/vim-color-akr/colors/akr.vim
+++ b/pkgs/vim/conf/vim-color-akr/colors/akr.vim
@@ -48,7 +48,7 @@ hi Conditional gui=bold guifg=#aadb0f guibg=NONE
hi MatchParen gui=bold guifg=NONE guibg=NONE
hi Special gui=NONE guifg=#808080 guibg=NONE
-hi SpecialKeyTab gui=NONE guifg=NONE guibg=#212121
+hi Tabs gui=NONE guifg=NONE guibg=#212121
hi ColorColumn gui=NONE guifg=NONE guibg=#000000
hi Conceal gui=NONE guifg=#808080 guibg=NONE
@@ -100,4 +100,4 @@ hi prologClauseHead gui=NONE guifg=#aadb0f guibg=NONE
hi IndentGuidesEven gui=NONE guifg=#424242 guibg=#2D2D2D
hi IndentGuidesOdd gui=NONE guifg=#424242 guibg=#2D2D2D
-match SpecialKey '^\s\+'
+match Tabs /[\t]\+/
diff --git a/pkgs/vim/custom.nix b/pkgs/vim/custom.nix
index a6c86af..25eea09 100644
--- a/pkgs/vim/custom.nix
+++ b/pkgs/vim/custom.nix
@@ -11,16 +11,18 @@ in
{ names = [
"ctrlp"
"undotree"
+ "goyo"
+ "ack-vim"
+ "tagbar"
"vim-unimpaired"
"vim-airline"
"vim-gitgutter"
- "goyo"
"vim-localvimrc"
- "tagbar"
"vim-addon-nix"
"vim-autoformat"
"vim-polyglot"
"vim-counterpoint"
+ "vim-bufferlist"
"vim-csexact"
"vim-color-akr"
];}
diff --git a/pkgs/vim/plugins.nix b/pkgs/vim/plugins.nix
index 801fb1e..71314b8 100644
--- a/pkgs/vim/plugins.nix
+++ b/pkgs/vim/plugins.nix
@@ -26,7 +26,15 @@ in {
rev = "93d8fd9d18a378ab3db39411300716129358211c";
sha256 = "02spr4mhj2035q45j8bf502jgpq76a518nv913zx46byfbl69lps";
};
+ };
+ "vim-bufferlist" = buildVimPlugin {
+ name = "vim-bufferlist";
+ src = fetchgit {
+ url = "https://github.com/roblillack/vim-bufferlist";
+ rev = "bb571a6dcbf19aa72d320545d376e1d13a8853a3";
+ sha256 = "0ddp9lzl5yv6xwqrqy0dzvd9b5igf6dm5pbyrl2bm0bg586zx3gr";
};
+ };
"vim-color-akr" = buildVimPlugin {
name = "vim-csexact";
src = ./conf/vim-color-akr;