summaryrefslogtreecommitdiff
path: root/nvim/init.vim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/init.vim')
-rwxr-xr-xnvim/init.vim35
1 files changed, 22 insertions, 13 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index bf9ccc4..17e721b 100755
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -1,13 +1,9 @@
" Manage plugins using vim-plug
-if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
- echo "Downloading junegunn/vim-plug to manage plugins..."
- silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
- silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim
- autocmd VimEnter * PlugInstall
-endif
-
-call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"'))
-"Plug 'jiangmiao/auto-pairs'
+"if ! exists('*plug#begin')
+" echo "Downloading junegunn/vim-plug to manage plugins..."
+"endif
+"
+call plug#begin()
Plug 'alvan/vim-closetag'
Plug 'ap/vim-css-color'
Plug 'junegunn/goyo.vim'
@@ -95,13 +91,13 @@ nmap gwh3 I<h3><ESC>l5xA</h3><ESC>
if ($USER) == 'root'
colorscheme koehler
else
- if empty($DISPLAY)
- colorscheme koehler
- else
+" if empty($DISPLAY)
+" colorscheme koehler
+" else
set bg=dark
let g:gruvbox_contrast_dark = 'hard'
colorscheme gruvbox-timmy
- endif
+" endif
endif
" Functions for changing the terminal emulator's class name to 'Vim'
@@ -144,3 +140,16 @@ function DelWS()
call winrestview(l:save_view)
endfunction
autocmd BufWritePre * call DelWS()
+
+
+" vim -b : edit binary using xxd-format!
+augroup Binary
+ au!
+ au BufReadPre *.bin let &bin=1
+ au BufReadPost *.bin if &bin | %!xxd
+ au BufReadPost *.bin set ft=xxd | endif
+ au BufWritePre *.bin if &bin | %!xxd -r
+ au BufWritePre *.bin endif
+ au BufWritePost *.bin if &bin | %!xxd
+ au BufWritePost *.bin set nomod | endif
+augroup END