fix some old paths, neovim distraction free mode updates
This commit is contained in:
parent
db059d115b
commit
575d73275c
2
setup
2
setup
|
@ -46,7 +46,7 @@ links=(
|
|||
|
||||
# text editor files
|
||||
"$dfp/text-editor/neovim" "$XDG_CONFIG_HOME/nvim"
|
||||
"$dfp/common/colors/vim" "$XDG_CONFIG_HOME/nvim/colors/current.vim"
|
||||
"$dfp/common/colors/vim" "$XDG_CONFIG_HOME/nvim/colors/base16-donokai.vim"
|
||||
)
|
||||
|
||||
source=""
|
||||
|
|
|
@ -18,10 +18,10 @@ BASE16_SHELL="$DOTFILES_PATH/common/colors/shell"
|
|||
[[ $- == *i* ]] && stty -ixon
|
||||
|
||||
# import the fonts we're using so we can pass them to other applications
|
||||
source "$DOTFILES_PATH/common/scripts/get-fonts.bash"
|
||||
source "$DOTFILES_PATH/os-specific/arch-linux/scripts/get-fonts.bash"
|
||||
|
||||
# import the functions that retrieve our theme colors
|
||||
source "$DOTFILES_PATH/common/scripts/get-colors.bash"
|
||||
source "$DOTFILES_PATH/os-specific/arch-linux/scripts/get-colors.bash"
|
||||
|
||||
# import our aliases
|
||||
source "$DOTFILES_PATH/shell/aliases"
|
||||
|
|
|
@ -193,13 +193,14 @@ endif
|
|||
|
||||
let base16colorspace=256
|
||||
set background=dark
|
||||
colorscheme current
|
||||
colorscheme base16-donokai
|
||||
|
||||
fun! ShowSpaceIndentation()
|
||||
hi WhiteSpaces ctermfg=black ctermbg=8
|
||||
match WhiteSpaces /^ \+/
|
||||
endfunction
|
||||
|
||||
" a toggle-able minimalistic "distraction-free" text editing mode
|
||||
let s:distractionFreeMode = 0
|
||||
fun! DistractionFreeModeFunc()
|
||||
AirlineToggle
|
||||
|
@ -222,9 +223,22 @@ fun! DistractionFreeModeFunc()
|
|||
set showcmd
|
||||
set number
|
||||
hi NonText ctermfg=gray guifg=gray
|
||||
colorscheme base16-donokai
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" prevents normal window navigation and closing while in DistractionFreeMode
|
||||
fun! CheckCloseDistractionFreeMode()
|
||||
if s:distractionFreeMode == 1
|
||||
call DistractionFreeModeFunc()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" run the check function every time we leave a window
|
||||
if has('autocmd')
|
||||
autocmd WinLeave * call CheckCloseDistractionFreeMode()
|
||||
endif
|
||||
|
||||
nnoremap <silent> <Leader>mz :DistractionFreeMode<CR>
|
||||
|
||||
:command! SpaceIndents call ShowSpaceIndentation()
|
||||
|
|
Reference in a new issue