Created
June 9, 2015 22:33
-
-
Save analogrelay/bc2c1454ed439b7233f2 to your computer and use it in GitHub Desktop.
My Vimrc
This file contains hidden or 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
" Update MYVIMRC | |
let $MYVIMRC="~/.dotfiles/vim.symlink/vimrc" | |
let $MYCOLORS="~/.dotfiles/vim.symlink/colorscheme.vim" | |
set ff=unix | |
" Make windows accept unixy stuff | |
if has('win32') || has('win64') | |
set runtimepath=~/.vim,$VIM/vimfiles,$VIM,$VIM/vimfiles/after,~/.vim/after | |
set dir=$TEMP | |
endif | |
let g:pathogen_disabled = [] | |
if !has('python') | |
call add(g:pathogen_disabled, 'omnisharp-vim') | |
endif | |
"Load pathogen | |
source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim | |
execute pathogen#infect() | |
"Psh, compatibility schmompatibility | |
set nocompatible | |
set list listchars=tab:».,trail:· | |
filetype plugin indent on " required | |
if has('gui_running') | |
"Set Color Scheme and font | |
colorscheme blacklight | |
set encoding=utf-8 | |
set guifont=Sauce_Code_Powerline:h10:cDEFAULT | |
" Maximize the window on launch | |
if has('win32') || has('win64') | |
au GUIEnter * simalt ~x | |
endif | |
if has("unix") | |
let s:uname = system("uname") | |
if s:uname == "Darwin\n" | |
" Do Mac stuff here | |
set fuopt=maxhorz,maxvert | |
set guifont=Sauce_Code_Powerline:h10 | |
"au GUIEnter * set fullscreen | |
endif | |
endif | |
endif | |
let g:airline_powerline_fonts=1 | |
set background=dark | |
"Configure some simple settings | |
set backspace=2 "Backspace over indents, eol, etc. | |
"Set up VIM GUIs | |
set guioptions-=m " Hide menu bar | |
set guioptions-=T " Remove toolbar | |
set guioptions-=r | |
set guioptions-=L " Remove scrollbars | |
"Syntax Highlighting ON! | |
syntax on | |
"Indentation configuration | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set smarttab | |
set expandtab | |
" Statusline and line numbers | |
set laststatus=2 | |
set number | |
" Macros/Mappings | |
" Force me to learn C-[ | |
imap <C-C> <nop> | |
" Change the leader to Space | |
let mapleader = "\<Space>" | |
" Leader mappings | |
nnoremap <Leader>w :w<CR> | |
nnoremap <Leader>y "+y | |
nnoremap <Leader>Y "+Y | |
nnoremap <Leader>d "+d | |
vnoremap <Leader>y "+y | |
vnoremap <Leader>Y "+Y | |
vnoremap <leader>d "+d | |
nnoremap <leader>p "+p | |
nnoremap <leader>p "+p | |
vnoremap <leader>p "+p | |
vnoremap <Leader>P "+P | |
nnoremap <Leader><Leader> V | |
" Pseudo-camelcasemotion | |
nnoremap ,e /.\u<CR> | |
nnoremap ,w /\u<CR> | |
nnoremap ,b ?\u<CR> | |
nnoremap <Leader><CR> o<C-[> | |
nnoremap <Leader>j i<CR><C-[> | |
" ThisIsATestString | |
nnoremap <CR> G | |
nnoremap <BS> gg | |
map q: :q | |
vnoremap v <Plug>(expand_region_expand) | |
vnoremap <C-v> <Plug>(expand_region_shrink) | |
" Use Ctrl-J and Ctrl-K to switch windows | |
map <C-J> <C-W>j<C-W>_ | |
map <C-K> <C-W>k<C-W>_ | |
" Configure NERDTree and NERDTree tabs | |
map <C-N> <Esc>:NERDTreeToggle<CR> | |
map <C-O> <Esc>:NERDTreeFocusToggle<CR> | |
let g:nerdtree_tabs_open_on_gui_startup=0 | |
let g:nerdtree_tabs_open_on_new_tab=0 | |
" CtrlP settings | |
let g:ctrlp_working_path_mode='ra' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment