Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after
- set t_Co=256
- " colorscheme xoria256
- " Some themes are only for gvim, not vim
- if (&t_Co == 256 || &t_Co == 88) && !has('gui_running') &&
- \ filereadable(expand("$HOME/.vim/plugin/guicolorscheme.vim"))
- runtime! plugin/guicolorscheme.vim
- GuiColorScheme fnaqevan
- else
- colorscheme fnaqevan
- endif
- set history=1000
- set acd " autochdir
- syntax on " Enable syntax highlighting
- filetype on " Enable filetype detection
- filetype indent on " Enable filetype-specific indenting
- filetype plugin on " Enable filttype-specific plugins
- set hidden " allow hidden buffers
- nnoremap ' `
- nnoremap ` '
- runtime macros/matchit.vim
- set wildmenu
- set wildmode=list:longest,full
- set backupdir=~/.local/share/vim
- set directory=~/.local/share/vim
- set nobackup
- set nowb
- set noswapfile
- set nocompatible
- set number " Show the line number
- set mouse=r " Let the mouse work in the console
- "set textwidth=100 " This gets in the way more than not
- set showmatch
- set ruler " Always show cursor
- set cursorline
- " display current mode and partially typed commands
- set showmode
- set showcmd
- " case-insensitive searches, unless caps are involved
- set ignorecase
- set smartcase
- " tabs -> spaces
- set expandtab
- set tabstop=4
- set softtabstop=4
- set shiftwidth=4
- set ai
- set shiftround
- " auto-indent
- set cindent
- set smartindent
- set autoindent
- " set cinkeys=0{,0},:,0#,!,!^F
- set hls
- set incsearch
- " textwidth limits
- autocmd BufRead /tmp/mutt-* set tw=72 " mutt limit to 72 characters
- autocmd BufRead *.txt set tw=78 " text files limit to 78 characters
- " somewhat buggy when working with splits, doesn't give good enough feedback
- " for files without textwidth limits, let's highlight very lengthy lines
- "highlight OverLength ctermbg=darkred ctermfg=white guibg=#ffd9d9
- "match OverLength /\%81v.\+/
- " vertical line at 80th column
- "highlight ColorColumn ctermbg=lightgrey guibg=lightgrey
- set colorcolumn=80
- let mapleader=","
- let g:mapleader=","
- let g:tex_flavor="pdflatex"
- "let g:tex_flavor="latex"
- " NERDTree
- map <F2> :silent NERDTreeToggle<CR>
- " Hypergit
- map <F3> :silent ToggleGitMenu<CR>
- set pastetoggle=<leader>p
- set confirm
- " transparent gpg editing
- " don't save backups of *.gpg files
- " set backupskip+=*.gpg
- " set viminfo=
- " augroup encrypted
- " au!
- " autocmd BufReadPre,FileReadPre *.gpg setlocal noswapfile bin
- " autocmd BufReadPost,FileReadPost *.gpg execute "'[,']!gpg --decrypt --default-recipient-self" | setlocal nobin | execute "doautocmd BufReadPost " . expand("%:r")
- " autocmd BufWritePre,FileWritePre *.gpg setlocal bin | '[,']!gpg --encrypt --default-recipient-self
- " autocmd BufWritePost,FileWritePost *.gpg silent u | setlocal nobin
- " augroup END
- "au BufWritePost *.html !tidy -eq %
- "au BufWritePost *.htm !tidy -eq %
- "au BufWritePost *.php !php -l %
- " when ~/.vimrc is changed, autoload
- autocmd! BufWritePost .vimrc source %
- " compile LaTeX files with :W
- autocmd BufEnter *.tex command -buffer W write | !pdflatex %<cr>
- autocmd BufLeave *.tex delcommand W
- " arduino syntax highlighting
- autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino
- "autocmd BufNew,BufRead :call UMiniBufExplorer
- "let g:miniBufExplorerMoreThanOne=0
- "let g:miniBufExplMapWindowNavVim = 1
- set listchars=tab:>-,trail:·,eol:$
- nmap <silent> <leader>s :set nolist!<CR>
- set shortmess=atI
- set autoread
- set magic
- set so=7
- set clipboard=unnamed
- " use templates
- autocmd! BufNewFile * call LoadTemplate()
- " jump between %VAR% placeholders in Insert mode with <Ctrl-p>
- inoremap <C-p> <ESC>/%\u.\{-1,}%<cr>c/%/e<cr>
- function! LoadTemplate()
- silent! 0r ~/.vim/skel/tmpl.%:e
- " Highlight %VAR% placeholders with the Todo color group
- syn match Todo "%\u\+%" containedIn=ALL
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement