Created
August 24, 2016 11:28
-
-
Save haskellcamargo/a52d11dac76f60e3cf1a919fe2c8eb8e to your computer and use it in GitHub Desktop.
Celão's Vim
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
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ | |
" Always show statusline | |
set laststatus=2 | |
" Use 256 colours | |
set t_Co=256 | |
call vundle#begin() | |
" Also, let Vundle manage itself | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'morhetz/gruvbox' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'ntpeters/vim-better-whitespace' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'wakatime/vim-wakatime' | |
Plugin 'jistr/vim-nerdtree-tabs' | |
Plugin 'hsanson/vim-android' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'artur-shaik/vim-javacomplete2' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'mxw/vim-jsx' | |
Plugin 'ctrlpvim/ctrlp.vim' | |
Plugin 'HerringtonDarkholme/yats.vim' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'digitaltoad/vim-pug' | |
Plugin 'nikvdp/ejs-syntax' | |
Plugin 'ianks/vim-tsx' | |
Plugin 'tpope/vim-rails' | |
Plugin 'wavded/vim-stylus' | |
Plugin 'xolox/vim-misc' | |
Plugin 'xolox/vim-colorscheme-switcher' | |
Plugin 'vim-coffee-script' | |
Plugin 'flazz/vim-colorschemes' | |
" Ignore generated folders | |
set wildignore+=*/node_modules/* | |
" All of your Plugins must be added before the following line | |
call vundle#end() | |
filetype plugin indent on | |
set history=500 | |
set autoread | |
set so=0 | |
let lang='en' | |
set langmenu=en | |
set paste | |
set wildmenu | |
set ruler | |
set backspace=eol,start,indent | |
if has('mouse') | |
set mouse=a | |
endif | |
set history=500 | |
set autoread | |
source $VIMRUNTIME/delmenu.vim | |
source $VIMRUNTIME/menu.vim | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set incsearch | |
set showmatch | |
set ai | |
set si | |
set wrap | |
set magic | |
syntax enable | |
set encoding=utf8 | |
set ffs=unix,dos,mac | |
set nobackup | |
set nowb | |
set noswapfile | |
set expandtab | |
set smarttab | |
set shiftwidth=4 | |
set tabstop=4 | |
set lbr | |
set tw=500 | |
set nu | |
syntax enable | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
autocmd vimenter * NERDTree | |
autocmd BufWritePre * StripWhitespace | |
execute pathogen#infect() | |
call pathogen#helptags() | |
colorscheme inkpot | |
set background=light | |
let g:airline_powerline_fonts = 1 | |
" If the current buffer has never been saved, it will have no name, | |
" call the file browser to save it, otherwise just save it. | |
command -nargs=0 -bar Update if &modified | |
\| if empty(bufname('%')) | |
\| browse confirm write | |
\| else | |
\| confirm write | |
\| endif | |
\|endif | |
nnoremap <silent> <C-S> :<C-u>Update<CR> | |
set ww+=<,> | |
" Because I love tabs | |
nnoremap <C-Left> :tabp<CR> | |
nnoremap <C-Right> :tabn<CR> | |
" I also like to change everything quickly | |
nnoremap <C-Up> :let &background = ( &background == "dark" ? "light" : "dark" )<CR> | |
" Allow NERDTree to exist when tabs are created | |
map <Leader>n <plug>NERDTreeTabsToggle<CR> | |
let g:nerdtree_tabs_open_on_console_startup=1 | |
" Set path for Android SDK (Android plugin) | |
let g:android_sdk_path='/home/haskell/Android/Sdk' | |
let g:gradle_path='./ngi/ginga-android/gradlew' | |
" Compile and install Android project | |
nmap <F5> <ESC>:Gradle assembleDebug<CR> | |
nmap <F10> <ESC>:AndroidInstall debug<CR> | |
nmap <F4> <ESC>:Gradle lint<CR> | |
" Show information about Gradle status on airline | |
let g:gradle_glyph_android = '' | |
let g:gradle_glyph_error = '✗' | |
let g:gradle_glyph_warning = '☢' | |
call airline#parts#define_function('vim-gradle-status', 'gradle#statusLine') | |
let g:airline_section_x=airline#section#create_right(['tagbar', 'filetype', 'vim-gradle-status']) | |
" Java/Android omnicompletion | |
autocmd FileType java setlocal omnifunc=javacomplete#Complete | |
" Quit all | |
nmap <F2> <ESC>:quitall!<CR> | |
nmap <F9> <ESC>:CtrlP<CR> | |
" Quack shortcuts | |
nmap <F3> <ESC>:! make -C /quack/quack qtest<CR> | |
nmap <F6> <ESC>:! quack -f <CR> | |
" General conceal settings | |
set conceallevel=1 | |
" (*disable*) set concealcursor=nvic | |
" Configure development for React | |
let g:jsx_ext_required = 0 | |
" Convert `.md' files for Markdown instead of Modula 2 | |
au BufRead,BufNewFile *.md set filetype=markdown | |
au BufRead,BufNewFile *.qk set filetype=quack | |
" Auto-close HTML tags | |
function s:CompleteTags() | |
inoremap <buffer> > ></<C-x><C-o><Esc>:startinsert!<CR><C-O>?</<CR> | |
inoremap <buffer> ><Leader> > | |
inoremap <buffer> ><CR> ></<C-x><C-o><Esc>:startinsert!<CR><C-O>?</<CR><CR><Tab><CR><Up><C-O>$ | |
endfunction | |
autocmd BufRead,BufNewFile *.html,*.js,*.xml call s:CompleteTags() | |
let g:NERDTreeIgnore=['node_modules'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment