From 66f366ad52068a7a567bbc832d48c71bc316b969 Mon Sep 17 00:00:00 2001 From: Von Random Date: Fri, 29 Jun 2018 17:04:26 +0300 Subject: [PATCH] a new way to handle vimwiki --- vimrc | 19 ++++++++----------- vimwikirc | 4 ++++ 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 vimwikirc diff --git a/vimrc b/vimrc index 93dfc43..8b7a2e0 100644 --- a/vimrc +++ b/vimrc @@ -9,12 +9,17 @@ set scrolloff=3 sidescrolloff=15 sidescroll=1 " disable bell set noerrorbells visualbell t_vb= " indentation -set tabstop=3 softtabstop=4 shiftwidth=4 smarttab expandtab +set tabstop=3 softtabstop=4 shiftwidth=4 smarttab expandtab autoindent " termcap fixes set t_Co=256 t_ut= termencoding=utf-8 encoding=utf-8 -" status line and title +" status line set wildmenu showcmd ruler laststatus=2 set statusline=[%F]\ %R%H%W%M\ %=[%{&fenc}/%{&ff}]\ %y\ [%4l/%L:%3v] +" update window title +if $TERM =~ '^\(screen\|tmux\)' + set t_ts=k + set t_fs=\ +endif set title titlestring=[%{hostname()}]\ %t\ -\ vim " enable case indentation let g:sh_indent_case_labels=1 @@ -53,11 +58,6 @@ noremap q nnoremap q :q nnoremap s :w -if $TERM =~ '^\(screen\|tmux\)' - set t_ts=k - set t_fs=\ -endif - if v:version >= 800 set breakindent @@ -65,10 +65,7 @@ if v:version >= 800 xmap a (EasyAlign) nmap a (EasyAlign) - " only plug vimwiki within vimwiki dir and this file - if expand('%:p:h') =~ 'vimwiki' - packadd vimwiki - endif + " enable packs based on filetype autocmd FileType python packadd jedi-vim | packadd ale autocmd FileType sh packadd ale diff --git a/vimwikirc b/vimwikirc new file mode 100644 index 0000000..1faf85b --- /dev/null +++ b/vimwikirc @@ -0,0 +1,4 @@ +set titlestring=vimwiki +let wiki = expand("$HOME/vimwiki/index.wiki") +packadd vimwiki +execute 'edit ' . fnameescape(wiki)