diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index e1a4776..a313dc3 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -95,7 +95,8 @@ filetype plugin on set foldminlines=3 "spacebar opens or closes a fold in normal mode - nmap za + nnoremap za + vnoremap za "indent folding: really basic fold method. eventually I may make some custom folds, but with the foldtext fixed a bit, this shouldn't annoy me too much. if foldtype ==# "basicindent" @@ -103,8 +104,17 @@ filetype plugin on set foldmethod=indent "make sure that comment are counted in indent folding! set foldignore= + set fillchars="fold:-" "set the fold text for this method, in most cases, the line just above our fold is what we want, so we wont put any text into it. just level and linecount. TODO - "set foldtext=Minimal_foldtext() + function! Minimal_foldtext() + let lines_count = v:foldend - v:foldstart + let lines_count_text = '+' . v:folddashes . '| ' . printf("%10S" , lines_count) . ' lines |' + let line_level_text = '| ' . printf("%5S" , 'level ' . v:foldlevel) . ' |' + let fold_text_end = line_level_text . repeat('-',8) + let fold_text_length = strlen(lines_count_text . fold_text_end) + &foldcolumn + return lines_count_text . repeat('-' , winwidth(0) - fold_text_length) . fold_text_end + endfunction + set foldtext=Minimal_foldtext() endif "useful keybinds diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index d647944..2f7e1f9 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -29,6 +29,10 @@ bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 +#moving panes between windows. +bind-key b command-prompt -p "bring pane from:" "join-pane -s '%%'" +bind-key s command-prompt -p "sent pane to:" "join-pane -t '%%'" + #reload conf with r bind r source-file ~/tmux.conf