dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 82d04ef16b697f94d69d04c79a870d80357519ee
parent 620de229b24e692dfb9416435d595202a8b0f37d
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu, 13 Jun 2019 20:25:31 +0200

vim: set colorscheme when switching light/dark

Former-commit-id: ecc8d3821d1e3e0af3fa1b59ea068ac20c265ed5
Diffstat:
Mvim/commands.vimrc | 44++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/vim/commands.vimrc b/vim/commands.vimrc @@ -91,56 +91,56 @@ endfunction function! ChooseSession() abort let files = ListSessions() if len(files) > 0 - let inputfiles = map(copy(files), 'index(files, v:val)+1.": ".v:val') - let response = inputlist(inputfiles) - if response > 0 - return files[response-1] - else - return "" - endif + let inputfiles = map(copy(files), 'index(files, v:val)+1.": ".v:val') + let response = inputlist(inputfiles) + if response > 0 + return files[response-1] + else + return "" + endif else - echo "No sessions available." - return "" + echo "No sessions available." + return "" endif endfunction function! LoadSession() abort let session = ChooseSession() if session != "" - execute 'source '.session + execute 'source '.session else - echo "\nNo session selected." + echo "\nNo session selected." endif endfunction function! DeleteSession() abort let sesh = ChooseSession() if sesh == "" - echo "\nNo session selected" - return 1 + echo "\nNo session selected" + return 1 endif let conf = confirm("Delete ".sesh."?", "&Yes\n&No\n", 2) if conf == 1 - if delete(sesh) == 0 - echom "Deleted ".sesh - else - echom "Couldn't delete ".sesh - endif + if delete(sesh) == 0 + echom "Deleted ".sesh + else + echom "Couldn't delete ".sesh + endif else - echom "No action taken." + echom "No action taken." endif endfunction function! CloseSession() bufdo! bwipeout cd if g:loaded_tagbar == 1 - execute "TagbarClose" + execute "TagbarClose" endif echom "Session closed." endfunction " }}} " Custom commands -command! Light set background=light | e -command! Dark set background=dark | e +command! Light set background=light | colorscheme kuroi +command! Dark set background=dark | colorscheme default command! TodoP vimgrep /^ *[#%\/E]* *\(TODO\|TO DO\)/ **/*.* | copen command! Todo vimgrep /^ *[#%\/E]* *\(TODO\|TO DO\)/ % | copen command! NoteP vimgrep /NOTE\C/ **/*.* | copen