Created
October 29, 2014 14:35
-
-
Save jillesme/b28e5d583513d30c74a0 to your computer and use it in GitHub Desktop.
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
source ~/.vundle | |
" -- DEFAULTS -- | |
" UTF-8 encoding | |
set encoding=utf-8 | |
" Default dir is sites | |
cd ~/Appsbroker | |
" Set leader key to , | |
let mapleader="," | |
" Don't close buffers, hide them | |
set hidden | |
" Show line numbers | |
set number | |
" Wrap the line | |
set wrap | |
" Don't wrap in the middle of a word / tag | |
" | |
set linebreak | |
" Don't wrap the line for us vim | |
set textwidth=0 | |
set wrapmargin=0 | |
" → for a linebreak | |
set showbreak=→ | |
" <tab> is equal to two spaces | |
set tabstop=2 | |
" Finetunes amount of whitespace to be inserted | |
set softtabstop=2 | |
" Spaces to use for indenting (with > and <) | |
set shiftwidth=2 | |
" Tabs are spaces | |
set expandtab | |
" Make backspace behave better | |
set backspace=indent,eol,start | |
" Copy indent from current line when starting a new line | |
set autoindent | |
" Copy the indent style of the whole file | |
set copyindent | |
" copy the previous indentation on autoindenting | |
set shiftround | |
" Highlight matching parenthesis | |
set showmatch | |
" Search case-insensitive | |
set ignorecase | |
" No highlighting while searching | |
set nohlsearch | |
" Unless first character is uppercase | |
set smartcase | |
" Insert shiftwidth amount of spaces before a line | |
set smarttab | |
" Start searching while typing | |
set incsearch | |
" Remember 1000 commands | |
set history=100 | |
" Undo 1000 moves | |
set undolevels=100 | |
" Show suggestions in the menu | |
set wildmenu | |
" Ignore these files when completing | |
set wildignore=*.swp,*.bak,*.pyc,*.exe | |
" Change terminal title to current file | |
set title | |
" Don't overwrite file permissions and systemlinks | |
set backupcopy=yes | |
" Refresh files if changed from the outside | |
set autoread | |
" No sounds, ever | |
set visualbell | |
set noerrorbells | |
" Display some characters | |
set list | |
set listchars=tab:⦊·,trail:·,extends:#,nbsp:· | |
" Don't backup files, or use swap files | |
set nobackup | |
" No .swp files | |
set noswapfile | |
" Foldings | |
set foldenable | |
set foldmethod=indent | |
set foldlevel=10 | |
" -- GUI -- | |
set cursorline | |
set background=dark | |
colorscheme base16-brewer | |
set guifont=Droid\ Sans\ Mono\ for\ Powerline:h16 | |
if $TERM == "xterm-256color" | |
set t_Co=256 | |
endif | |
set laststatus=2 | |
syntax on | |
" -- MAPPINGS -- | |
nnoremap 0 ^ | |
nnoremap j gj | |
nnoremap k gk | |
nnoremap <leader>f :CtrlP<CR> | |
nnoremap <leader>F :CtrlPMRU<CR> | |
nnoremap <leader>b :CtrlPBuffer<CR> | |
nnoremap <leader>e :CtrlPMixed<CR> | |
nnoremap <leader>a :Ack! ""<left> | |
nnoremap <leader>A :Ack! "<C-r><c-W>"<CR> | |
nnoremap <leader>u :GundoToggle<CR> | |
nnoremap <leader>l :set relativenumber!<CR> | |
nnoremap <leader>q :bd!<CR> | |
nnoremap <right> :bn<CR> | |
nnoremap <left> :bp<CR> | |
nnoremap > >> | |
nnoremap < << | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
nnoremap <space> za | |
vnoremap <space> zf | |
nnoremap <silent> <F10> :call <SID>StripTrailingWhitespaces()<CR> | |
" -- PLUGIN SETTTINGS -- | |
let g:ctrlp_custom_ignore = { | |
\'dir': 'Applications (\(Parallels\))?\| \Dropbox\|Library\|Music\| | |
\^Movies$\|Pictures\|node_modules\|bower_components', | |
\'file': '\.DS_STORE$' | |
\ } | |
let g:ctrlp_match_window = 'bottom,order:ttb' | |
let g:ctrlp_switch_buffer = 0 | |
let g:ctrlp_working_path_mode = 0 | |
" let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' | |
let g:UltiSnipsListSnippets = "<down>" | |
let g:UltiSnipsExpandTrigger = "<S-TAB>" | |
let g:ycm_key_list_previous_completion = ['<Up>'] | |
let g:rooter_manual_only = 1 | |
let g:syntastic_javascript_jshint_exec = '/usr/local/bin/jshint' | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_error_symbol = "✗" | |
let g:syntastic_warning_symbol = "⚠" | |
let g:angular_source_directory = 'public/src/' | |
let g:angular_test_directory = 'test/spec' | |
let g:angular_filename_convention = 'titlecased' | |
let g:airline_theme="base16" | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
" Allow Angular directives and empty <i>s (font awesome) | |
let g:syntastic_html_tidy_ignore_errors=[ | |
\"proprietary attribute \"ng-", | |
\"trimming empty <i>", | |
\] | |
" -- AUTO COMMANDS -- | |
au BufRead ~/.vundle set filetype=vim | |
au BufEnter * silent! lcd %:p:h | |
au FileType javascript,css,scss setlocal foldmarker={,} | |
" Automatically close preview window | |
au CursorMovedI * if pumvisible() == 0|pclose|endif | |
au InsertLeave * if pumvisible() == 0|pclose|endif | |
" -- FUNCTIONS -- | |
function! <SID>StripTrailingWhitespaces() | |
" Save last search and cursor position | |
let _s=@/ | |
let l = line(".") | |
let c = col(".") | |
" Remove trailing whitespace | |
%s/\s\+$//e | |
" Restore last search and cursor position | |
let @/=_s | |
call cursor(l, c) | |
endfunction | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment