Created
November 23, 2020 16:57
-
-
Save JustinLove/627c1a78d20de8f8b1a2a8d6a9fc4b46 to your computer and use it in GitHub Desktop.
My vimrc, used in gvim and macvim, with a bit of probably unused cruft
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
:scriptencoding utf-8 | |
let mapleader="," | |
let maplocalleader=",," | |
let g:ctrlp_map = '<leader>t' | |
let g:ctrlp_cmd = 'CtrlP' | |
let g:ctrlp_working_path_mode = '' | |
"let g:ctrlp_max_height = 100 | |
" | |
runtime macros/matchit.vim | |
filetype off | |
call pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set nocompatible | |
set modelines=0 | |
set scrolloff=3 | |
set showcmd | |
set wildmenu | |
set wildmode=list:longest | |
set wildignore+=*/railshost/tmp/*,*/tmp/*,*/db/postgres/*,*/node_modules/*,*/dist/*,*.orig,*/iPhoneSimulator*,*/iPhoneOS*,*/vendor/*,*/elm-stuff/*,*/cache/*,*/build/windows/*,*/tiles/*,*/opt/*,*/crucible/*,*/crucible_raw/*,*/output/*,*/kp/*,*/ml/*,*/pl/*,*/kptest/*,*/mltest/*,*/plbackup/*,*/publicMapChangeData/*/static*/* | |
"set wildignore+=*/railshost/tmp/*,*/tmp/*,*/db/postgres/*,*/dist/*,*.orig,*/iPhoneSimulator*,*/iPhoneOS*,*/vendor/* | |
set visualbell | |
set cursorline | |
set ttyfast | |
set ruler | |
set laststatus=2 | |
set ignorecase | |
set smartcase | |
set gdefault | |
set incsearch | |
set showmatch | |
set hlsearch | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set autoindent | |
set dir=/tmp " .swp files | |
set number | |
set backspace=indent,eol,start | |
if has("win32") | |
set encoding=utf-8 | |
set guifont=Consolas\ for\ Powerline\ FixedD:h18 | |
let g:Powerline_symbols="fancy" | |
set dir=$TMP,$TEMP,. | |
else | |
set guifont=Menlo\ Regular:h18 | |
endif | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 0 | |
let g:syntastic_check_on_wq = 0 | |
"let g:syntastic_lua_checkers = ['luacheck'] | |
let g:syntastic_cpp_config_file = 'syntastic_cpp_config_file' | |
inoremap jj <ESC> | |
inoremap <F1> <ESC> | |
nnoremap ; : | |
nnoremap \ :w<cr> | |
nnoremap <leader>r :CommandTFlush<cr> | |
nnoremap <leader>a :Ack | |
" window movement | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" moving through results | |
nnoremap <C-n> :cn<cr>z. | |
" current C function | |
fun! ShowFuncName() | |
echohl ModeMsg | |
echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bWn')) | |
echohl None | |
endfun | |
nnoremap <leader>f :call ShowFuncName() <CR> | |
" Use the same symbols as TextMate for tabstops and EOLs | |
set list | |
set listchars=tab:▸\ ,eol:¬ | |
" extensions for gf | |
set suffixesadd=.js,.rb | |
" Inserts the path of the currently edited file into a command | |
" Command mode: Ctrl+P | |
cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR> | |
" Source the vimrc file after saving it | |
if has("autocmd") | |
autocmd bufwritepost .vimrc source $MYVIMRC | |
autocmd bufwritepost _vimrc source $MYVIMRC | |
" Syntax of these languages is fussy over tabs Vs spaces | |
autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab | |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
" Stepmania files use tabs | |
autocmd FileType lua setlocal ts=2 sts=2 sw=2 noexpandtab | |
autocmd BufNewFile,BufRead *.frag,*.vert,*.fp,*.vp,*.glsl,*.vs,*.fs setf glsl | |
endif | |
colorscheme jll_macvim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment