Vim: Remove vimwiki, replace with built-in options

- vimrc-plugins: Remove vimwiki
- vimrc-plugins: Remove vimcompletesme
- vimrc-plugins: Remove vimwiki config
- vimrc: Move template function from vimrc-plugins
- vimrc: create mappings for new wiki/notes system
- vimrc: Move functions to own section
This commit is contained in:
Bill Niblock 2017-12-19 13:45:16 -05:00
parent 5c03a7f4d9
commit fdcaf7c414
2 changed files with 20 additions and 20 deletions

View file

@ -81,12 +81,6 @@ endif
" ============================================================================== " ==============================================================================
" Status Line " Status Line
" ============================================================================== " ==============================================================================
function! GitBranch() abort " Fetch the Git branch of cwd
let l:branchname = system("git rev-parse --abbrev-ref HEAD 2>/dev/null
\ | tr -d '\n'")
return strlen(l:branchname) > 0 ? '#'.l:branchname : ''
endfunction
set laststatus=2 " Enable the statusline set laststatus=2 " Enable the statusline
set statusline= " Initialize it set statusline= " Initialize it
set statusline+=%3*%m " Modified flag set statusline+=%3*%m " Modified flag
@ -122,6 +116,26 @@ nnoremap <silent> <leader>f :<C-u>edit ~/.dotfiles/<CR>
nnoremap <silent> <leader>F :<C-u>tabnew ~/.dotfiles/<CR> nnoremap <silent> <leader>F :<C-u>tabnew ~/.dotfiles/<CR>
" Emulate vim-vinegar " Emulate vim-vinegar
nnoremap <silent> - :silent edit <C-R>=empty(expand('%')) ? '.' : expand('%:p:h')<CR><CR> nnoremap <silent> - :silent edit <C-R>=empty(expand('%')) ? '.' : expand('%:p:h')<CR><CR>
" Some notes/wiki shortcuts
nnoremap <silent> <leader>ww :<C-u>edit ~/Documents/Wiki/index.md<CR>
nnoremap <silent> <leader>ws :<C-u>vsplit ~/Documents/Wiki/scratchpad.md<CR>
nnoremap <silent> <leader>wt :<C-u>vsplit ~/Documents/Wiki/to-do.md<CR>
nnoremap <silent> <leader>wd :<C-u>edit ~/Documents/Wiki/diary/diary.wiki<CR>
nnoremap <silent> <leader>tj :call NewJournal()<CR>
" ==============================================================================
" Functions
" ==============================================================================
" Read from the journal template, and replace 'Date' with today's date
function! NewJournal() abort
.-1read ~/.vim/templates/journal
s/Date/\=strftime("%A, %B %d")/
endfunction
" Fetch the git branch of the current file, if applicable
function! GitBranch() abort
let l:branchname = system("git rev-parse --abbrev-ref HEAD 2>/dev/null
\ | tr -d '\n'")
return strlen(l:branchname) > 0 ? '#'.l:branchname : ''
endfunction
" ============================================================================== " ==============================================================================
" Plugins " Plugins
" ============================================================================== " ==============================================================================

View file

@ -10,26 +10,12 @@ endif
call plug#begin('~/.vim/bundle') call plug#begin('~/.vim/bundle')
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'vimwiki/vimwiki'
Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
Plug 'ajh17/VimCompletesMe'
"Plug 'ludovicchabant/vim-gutentags' "Plug 'ludovicchabant/vim-gutentags'
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'junegunn/goyo.vim' Plug 'junegunn/goyo.vim'
Plug 'tpope/vim-tbone' Plug 'tpope/vim-tbone'
call plug#end() call plug#end()
" ==============================================================================
" Plugin Configuration
" ==============================================================================
" Vimwiki Configs
let g:vimwiki_list = [{'path': '~/Workbench/vimwiki/', 'auto_tags': 1}]
"" Insert my journal template, and the current date
nnoremap <silent><leader>tj :call NewJournal()<CR>
function! NewJournal() abort
.-1read ~/.vim/templates/journal
s/Date/\=strftime("%A, %B %d")/
endfunction