Skip to content

Commit

Permalink
.vimrc aint exactly perfect, but it is a helluh πŸ”₯ a lot better than…
Browse files Browse the repository at this point in the history
… where I was a week ago πŸ™
  • Loading branch information
ipatch committed Jun 22, 2018
1 parent 29dd582 commit 1bb14b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .wiki
Submodule .wiki updated from 89d03c to a8b5eb
24 changes: 14 additions & 10 deletions editors/vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ augroup END
""""""""""""""""""""""""""""""
" autocommand - `line_return`
" NOTE: return to the line number when reopening a buffer / file
" NOTE: buffer does not need saving to remember position πŸ‘
""
augroup line_return
au!
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ execute 'normal! g`"zvzz' |
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ execute "normal! g`\"" |
\ endif
augroup END

Expand Down Expand Up @@ -371,10 +371,10 @@ set packpath^=~/.vim
" Try to load minpac.
silent! packadd minpac

function! BuildVimMarkdownComposer()
function! BuildStaticVimMarkdownComposer()
" if a:info.status != 'unchanged' || a:info.force
if has('nvim')
!(cd '/opt/Code/dotfiles/editors/vim/vim/pack/minpac/start/vim-markdown-composer'; cargo build --release > ~/logs/vim-markdown-composer-static-build.log)
!(cd '/opt/Code/dotfiles/editors/vim/vim/pack/minpac/start/vim-markdown-composer'; cargo build --release)
" !cargo build --release
else " Vim8 support!
!cargo build --release --no-default-features --features json-rpc
Expand Down Expand Up @@ -423,16 +423,20 @@ else
""""""""""""""""""""""""""""""
" plugin - vim-markdown-composer - preview `.md` docs in default browser
""
call minpac#add('euclio/vim-markdown-composer', {
\'do': function('BuildVimMarkdownComposer') } )
" TODO: getting a working `post-install` function working with minpac
" function! s:hook(hooktype, name)
" echom a:hooktype
" echom 'Directory:' minpac#getplugininfo(a:name).dir
" call system('cargo build --release')
" endfunction
" call minpac#add('euclio/vim-markdown-composer', { 'do': function('s:hook')})
call minpac#add('euclio/vim-markdown-composer', {'do': '!cargo build --release'})
elseif v:version > 8 || v:version == 8 " Check for Vim8 ...sort of
call minpac#add('Shougu/deoplete.nvim')
call minpac#add('roxma/nvim-yarp')
call minpac#add('roxma/vim-hug-neovim-rpc')
call minpac#add('autozimu/LanguageClient-neovim', {
\'branch': 'next', 'do': {-> system('bash install.sh')}})
call minpac#add('euclio/vim-markdown-composer', {
\'do': '!cargo build --release --no-default-features --features json-rpc'}, executable('cargo'))
endif
"""""""""""""""""""""""""""""
" minpac - Custom commands
Expand Down

0 comments on commit 1bb14b8

Please sign in to comment.