Skip to content

Instantly share code, notes, and snippets.

@WilliamBundy
Created June 15, 2018 22:23
Show Gist options
  • Save WilliamBundy/45422c5105e9a0aa2dea6d0eae2dbd52 to your computer and use it in GitHub Desktop.
Save WilliamBundy/45422c5105e9a0aa2dea6d0eae2dbd52 to your computer and use it in GitHub Desktop.
Vimrc 2018
set nocompatible
behave mswin
filetype plugin indent on
call plug#begin('C:/Vim/vimfiles/bundle')
Plug 'raymond-w-ko/vim-lua-indent'
Plug 'tomasr/molokai'
Plug 'vim-scripts/wombat'
Plug 'tpope/vim-surround'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'craigemery/vim-autotag'
Plug 'tikhomirov/vim-glsl'
Plug 'jiangmiao/auto-pairs'
Plug 'reedes/vim-pencil'
Plug 'Tetralux/odin.vim'
call plug#end()
set completeopt=longest,menuone,preview
inoremap <expr> <C-Space> pumvisible() ? "\<C-n>" : "\<C-X><C-]><C-n>"
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <Esc> pumvisible() ? "\<C-e>" : "\<Esc>"
imap <expr> <CR> pumvisible() ? "\<C-y><Esc><C-W>}i" : "\<CR>"
inoremap <expr> <Down> pumvisible() ? "\<C-n>" : "\<Down>"
inoremap <expr> <Up> pumvisible() ? "\<C-p>" : "\<Up>"
inoremap <expr> <PageDown> pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<PageDown>"
inoremap <expr> <PageUp> pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<PageUp>"
let g:autotagTagsFile='./tags'
let g:autotagCtagsCmd='C:/ctags.exe'
set tags+=./tag
set guifont=Inconsolata:h14
set guioptions-=T
set guioptions-=m
set guioptions-=r
set guioptions-=L
set noswapfile
let g:ctrlp_working_path_mode = 'rw'
let g:ctrlp_use_caching = 0
let g:ctrlp_root_markerns = ['make.bat', '.old']
let g:AutoPairsMultilineClose = 0
"General
set history=500
set autoread
let mapleader = "\<Space>"
let g:mapleader = "\<Space>"
nmap <leader>w :w!<cr>
" User Interface
let $LANG='en'
set wildmenu
set wildignore=*.o,*~,*.pyc,*.pdb,*.obj,*.exe,*.dll,*.dat,*.exp,*.lib,*.ase,*.mlt,tags,*.bdf
if has("win16") || has("win32")
set wildignore+=.git\*,.hg\*,.svn\*,msvc_libs\*
else
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store,*/msvc_libs/*,*/usr/*
endif
set ruler
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set linebreak
nnoremap <CR> a<CR><Esc>k$
let delimitMate_jump_expansion = 1
let delimitMate_expand_cr = 1
set switchbuf=useopen,split
set ignorecase
set smartcase
set hlsearch
set incsearch
set magic
set showmatch
set mat=2
set cursorline
set noerrorbells
set vb t_vb=
autocmd GUIEnter * set vb t_vb=
set tm=500
syntax enable
try
colorscheme molokai
catch
endtry
set encoding=utf8
set ffs=unix,dos,mac
set nobackup
set nowb
set noswapfile
set smarttab
set shiftwidth=4
set tabstop=4
set ai
set si
set cindent
set wrap
set cc=84
map j gj
map k gk
map <silent> <leader><cr> :noh<cr>
noremap <silent> <leader>m :wa<cr>:silent make<cr>
noremap <silent> <leader>r :wa<cr>:silent make run<cr>
noremap <silent> <leader>n :wa<cr>:silent make meta<cr>
noremap <silent> <leader>h :wa<cr>:silent make release run<cr>
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
map 0 ^
set laststatus=2
set number
" set completeopt-=preview
map <MiddleMouse> <Nop>
imap <MiddleMouse> <Nop>
map <2-MiddleMouse> <Nop>
imap <2-MiddleMouse> <Nop>
map <3-MiddleMouse> <Nop>
imap <3-MiddleMouse> <Nop>
map <4-MiddleMouse> <Nop>
imap <4-MiddleMouse> <Nop>
function WilliamStartIDE()
vs
cope
endfunction
command IDE :call WilliamStartIDE()
command CdCurrent :cd %:p:h
nnoremap Q <Nop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment