Skip to content

Instantly share code, notes, and snippets.

@ssilva
Last active July 21, 2017 20:48
Show Gist options
  • Save ssilva/9a9c8365744cc44e9575ff0a80b22469 to your computer and use it in GitHub Desktop.
Save ssilva/9a9c8365744cc44e9575ff0a80b22469 to your computer and use it in GitHub Desktop.
execute pathogen#infect()
"execute pathogen#helptags()
" Suggested Pathogen plugins
" https://github.com/tpope/vim-commentary.git
" https://github.com/tpope/vim-obsession.git
" https://github.com/tpope/vim-sensible.git
" https://github.com/tpope/vim-markdown.git
" https://github.com/itchyny/lightline.vim
" https://github.com/terryma/vim-multiple-cursors.git
" https://github.com/mhinz/vim-signify
" https://github.com/chriskempson/base16-vim
" Indent 4 spaces
set shiftwidth=4
set tabstop=8 softtabstop=0 expandtab smarttab
" Show whitespace chars
set list
set background=dark
set colorcolumn=100
"colorscheme base16-tomorrow-night
colorscheme base16-default-dark
" vim-markdown
let g:markdown_fenced_languages = ['bash=sh', 'sql', 'cpp', 'java', 'cfg']
let g:markdown_syntax_conceal = 0
" vim-signify
let g:signify_vcs_list = [ 'hg' ]
if has("gui_running")
" Disable toolbar, menubar and GUI tabs
set guioptions-=T
set guioptions-=m
set guioptions-=e
" Show line numbers
set number
" Highlight current line
set cursorline
" Maximize window
set lines=999 columns=999
" Synch with system clipboard
set clipboard=unnamedplus
"set clipboard=unnamed
" Copy to 'clipboard registry'
vmap <C-c> "+y
"vmap <C-c> "*y
" Shift-Insert to paste
noremap! <S-Insert> <C-R>+
nnoremap <S-Insert> "+gP
snoremap <S-Insert> <Esc>gvc<C-R>+
xnoremap <S-Insert> c<C-R>+<Esc>
au VimEnter * nested :call LoadSession()
endif
"execute 'source ~/.vim/mysession.vim'
function! LoadSession()
let b:sessionfile = $HOME . "/.vim/mysession.vim"
if (filereadable(b:sessionfile))
exe 'source ' b:sessionfile
else
echo "No session loaded."
endif
endfunction
" Since we need our own function to load the session, we might as well drop
" vim-obssession and use our own function to make the session as well.
"
"function! MakeSession()
" let b:sessiondir = $HOME . "/.vim/"
" if (filewritable(b:sessiondir) != 2)
" exe 'silent !mkdir -p ' b:sessiondir
" redraw!
" endif
" let b:filename = b:sessiondir . '/mysession.vim'
" exe "mksession! " . b:filename
"endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment