Skip to content

Instantly share code, notes, and snippets.

@bnchdrff
Created November 8, 2018 21:30
Show Gist options
  • Save bnchdrff/05d67d3100fae4ad611dcaf8d76d3ca8 to your computer and use it in GitHub Desktop.
Save bnchdrff/05d67d3100fae4ad611dcaf8d76d3ca8 to your computer and use it in GitHub Desktop.
my .vimrc
version 5.4
" pathogen!
call pathogen#infect()
call pathogen#helptags()
autocmd!
filetype on
filetype plugin on
syntax on
set autoindent
set autowrite
"set backspace=indent,eol,start
set nobackup
"set backupdir=~/.vim/backups
set background=light
set nocompatible
set noerrorbells
set esckeys
set expandtab
set fileformat=unix
set formatoptions=cqrtl
set helpheight=0
set hidden
set history=100
set nohlsearch
set ignorecase
set incsearch
set iskeyword=@,48-57,_,192-255,-,.,@-@
set laststatus=2
set lazyredraw
set magic
set more
set mouse=a
set pastetoggle=<F9>
set path=.,~/
set report=0
set restorescreen
set ruler
set scrolloff=0
set shell=/bin/sh
set shiftwidth=2
set showbreak="+ "
set showcmd
set showmatch
set showmode
set smartcase
set smartindent
set smarttab
set nostartofline
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
set tabstop=2
set tildeop
set title
set ttyfast
set undolevels=1000
set updatecount=100
set updatetime=6000
set viminfo=%,'50,\"100,:500,n~/.viminfo
set visualbell
set whichwrap=<,>,b,s
set wildchar=<TAB>
if &term=="xterm"
set t_Co=256
set t_Sb=[4%dm
set t_Sf=[3%dm
endif
set number
set relativenumber
" disarm C-z
map <C-Z> :shell
" Dtws = delete trailing whitespace
nmap ,Dtws :%s/ *$//g<C-M>
vmap ,Dtws :%s/ *$//g<C-M>
" arrow keys and function keys.
map <F1> oD_ENTER(3);<ESC>
map <F2> oD_RETURN_(3);<ESC>
map <F3> oD_RETURN(3, );<ESC>hi
map <F4> iD_RETURN(3, <ESC>$i)<ESC>
" complete with tab
inoremap <Tab> 
" next/prev buf
nnoremap <C-n> :bn<CR>
nnoremap <C-p> :bp<CR>
" AutoCommands
augroup wml
au!
autocmd BufRead *.wml set ft=html
augroup END
augroup ejs
au!
autocmd Bufread *.ejs set ft=html
augroup END
augroup apex
au!
autocmd BufRead *.cls set ft=apexcode shiftwidth=4 tabstop=4
autocmd BufRead *.trigger set ft=apexcode shiftwidth=4 tabstop=4
augroup END
let g:jsx_ext_required = 0
au VimEnter *.clj RainbowParenthesesToggle
au Syntax *.clj RainbowParenthesesLoadRound
au Syntax *.clj RainbowParenthesesLoadSquare
au Syntax *.clj RainbowParenthesesLoadBraces
"for twig
au BufRead,BufNewFile *.twig set ft=htmljinja
" Force.com
let g:apex_backup_folder="/home/bc/apex/backup"
let g:apex_temp_folder="/home/bc/apex/tmp"
let g:apex_properties_folder="/home/bc/apex/properties"
let g:apex_tooling_force_dot_com_path="/home/bc/.dotfiles/entrails/tooling-force.com-0.3.8.0.jar"
let g:apex_API_version="39.0"
vnoremap <C-c> "*y
" Get rid of the extra status line when chanigng bufs
autocmd BufWinEnter * call feedkeys("\<C-\>\<C-n>:\<CR>", 'n')
" Disable bracketed paste mode (avoid 0~ and 1~ being inserted after pastes)
set t_BE=
" ctrlp
let g:ctrlp_map = '<c-f>'
let g:ctrlp_cmd = 'CtrlPBuffer'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](node_modules|dist|build|\.git)$',
\ }
" vim-lsc
let g:lsc_server_commands = {'dart': 'dart_language_server'}

i use pathogen and the following vim plugins:

ctrlp.vim dart-vim-plugin delimitMate php.vim tsquyomi typescript-vim vim-abolish vim-colors-solarized vim-endwise vim-flagship vim-force.com vim-fugitive vim-gitgutter vim-gutentags vim-lsc vimproc.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment