Last active
July 21, 2017 20:48
-
-
Save ssilva/9a9c8365744cc44e9575ff0a80b22469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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