Skip to content

Instantly share code, notes, and snippets.

@pianomanfrazier
Last active August 29, 2017 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pianomanfrazier/732e6d7c62c325b9aa9157a3d51b2dee to your computer and use it in GitHub Desktop.
Save pianomanfrazier/732e6d7c62c325b9aa9157a3d51b2dee to your computer and use it in GitHub Desktop.
This is my vimrc file. You will need the pathogen plugin manager as well as UltiSnips.
execute pathogen#infect()
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsSnippetDir="~/.vim/UltiSnips"
let g:UltiSnipsSnippetDirectories=["~/.vim/UltiSnips", "UltiSnips"]
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" Spell check for documents
:noremap <leader>sp :setlocal spell spelllang=en_us<cr>
:noremap <leader>nsp :set nospell<cr>
set tabstop=2
set shiftwidth=2
set softtabstop=2
set noexpandtab
set mouse=a
:set t_Co=256
syntax on
let g:netrw_liststyle=3
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
"set relativenumber
set number
set undofile
let mapleader = ","
:noremap <leader>k :Sex<cr>
:noremap <leader>l :Vex<cr>
:noremap <leader>m :!make<cr>
:noremap <leader>r :!make run<cr>
:noremap <leader>gs :Gstatus<cr>
:noremap <leader>gc :Gcommit<cr>
:noremap <leader>gp :Gpush<cr>
:noremap <leader>ue :UltiSnipsEdit<cr>
:noremap <leader>w :w<cr>
"test c++ using codeforces test script
:noremap <leader>t :!./test.sh<cr>
:nnoremap <leader>ev :vsplit $MYVIMRC<cr>
:nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap / /\v
vnoremap / /\v
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
nnoremap <leader><space> :noh<cr>
nnoremap <tab> %
vnoremap <tab> %
set wrap
set textwidth=79
set formatoptions=qrn1
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
nnoremap ; :
inoremap jj <ESC>
inoremap kk <ESC>
nnoremap H ^
nnoremap L $
let g:multi_cursor_exit_from_insert_mode = 0
"some auto complete features
inoremap { {}<Left>
inoremap {<CR> {<CR>}<Esc>O<tab>
"detect lines to long
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
"inoremap <Left>
"inoremap ' ''<Left>
inoremap [ []<Left>
"inoremap <<CR> <><Left>
inoremap ( ()<Left>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment