|
|
@ -1,4 +1,8 @@ |
|
|
|
" (I copied the example .vimrc and added some stuff) |
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" This is basically a copy of the starting vimrc, just to make sure I |
|
|
|
|
|
|
|
" have all the cool things enabled |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
" Use Vim settings, rather then Vi settings (much better!). |
|
|
|
" Use Vim settings, rather then Vi settings (much better!). |
|
|
|
" This must be first, because it changes other options as a side effect. |
|
|
|
" This must be first, because it changes other options as a side effect. |
|
|
|
set nocompatible |
|
|
|
set nocompatible |
|
|
@ -53,6 +57,10 @@ else |
|
|
|
set autoindent " always set autoindenting on |
|
|
|
set autoindent " always set autoindenting on |
|
|
|
endif " has("autocmd") |
|
|
|
endif " has("autocmd") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" Those are my settings |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
set tabstop=4 |
|
|
|
set tabstop=4 |
|
|
|
set shiftwidth=4 |
|
|
|
set shiftwidth=4 |
|
|
|
set foldmethod=marker |
|
|
|
set foldmethod=marker |
|
|
@ -74,8 +82,15 @@ set smartindent " smart identation |
|
|
|
set number |
|
|
|
set number |
|
|
|
set wim=longest,list " file auto-completion |
|
|
|
set wim=longest,list " file auto-completion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set t_Co=256 " 256 color terminals |
|
|
|
|
|
|
|
color busybee " color for terminals (gvimrc sets the UI color) |
|
|
|
|
|
|
|
|
|
|
|
let mapleader="," " use comma to start user-defined (in plugins) functions |
|
|
|
let mapleader="," " use comma to start user-defined (in plugins) functions |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" Auto-commands |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
" default python style |
|
|
|
" default python style |
|
|
|
" (use spaces instead of tabs (expandtab), uses 4 spaces for tabs (tabstop), |
|
|
|
" (use spaces instead of tabs (expandtab), uses 4 spaces for tabs (tabstop), |
|
|
|
" when auto-indenting, also use 4 spaces (shiftwidth), when deleting text, 4 |
|
|
|
" when auto-indenting, also use 4 spaces (shiftwidth), when deleting text, 4 |
|
|
@ -106,13 +121,11 @@ au FileType mail setlocal spell spelllang=en |
|
|
|
" HTML templates do not need breaks |
|
|
|
" HTML templates do not need breaks |
|
|
|
au FileType htmldjango set textwidth=0 |
|
|
|
au FileType htmldjango set textwidth=0 |
|
|
|
|
|
|
|
|
|
|
|
" 256 color terminals |
|
|
|
|
|
|
|
set t_Co=256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Because we are using 256 color terminals, we can use the very colorful theme |
|
|
|
|
|
|
|
color busybee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
" mapings |
|
|
|
" mapings |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
" Easy switching between tabs (just use Alt+<tab number>) |
|
|
|
" Easy switching between tabs (just use Alt+<tab number>) |
|
|
|
if has('mac') |
|
|
|
if has('mac') |
|
|
|
map <D-1> :tabn 1<CR> |
|
|
|
map <D-1> :tabn 1<CR> |
|
|
@ -167,23 +180,41 @@ let php_smart_members=1 |
|
|
|
set rtp+=~/.vim/bundle/vundle/ |
|
|
|
set rtp+=~/.vim/bundle/vundle/ |
|
|
|
call vundle#rc() |
|
|
|
call vundle#rc() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" Bundles |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" status line |
|
|
|
Bundle "Lokaltog/powerline" |
|
|
|
Bundle "Lokaltog/powerline" |
|
|
|
|
|
|
|
" git support |
|
|
|
Bundle 'tpope/vim-fugitive' |
|
|
|
Bundle 'tpope/vim-fugitive' |
|
|
|
|
|
|
|
" comment code with keys |
|
|
|
Bundle 'tpope/vim-commentary' |
|
|
|
Bundle 'tpope/vim-commentary' |
|
|
|
|
|
|
|
" align things |
|
|
|
Bundle 'godlygeek/tabular' |
|
|
|
Bundle 'godlygeek/tabular' |
|
|
|
Bundle 'jiangmiao/auto-pairs' |
|
|
|
" close pairs |
|
|
|
|
|
|
|
" Bundle 'jiangmiao/auto-pairs' |
|
|
|
|
|
|
|
" close pairs |
|
|
|
|
|
|
|
Bundle 'Townk/vim-autoclose' |
|
|
|
|
|
|
|
" python flake8 support (with F7) |
|
|
|
Bundle 'nvie/vim-flake8' |
|
|
|
Bundle 'nvie/vim-flake8' |
|
|
|
|
|
|
|
" snippets |
|
|
|
Bundle 'msanders/snipmate.vim' |
|
|
|
Bundle 'msanders/snipmate.vim' |
|
|
|
|
|
|
|
" fuzzy file open |
|
|
|
Bundle 'kien/ctrlp.vim' |
|
|
|
Bundle 'kien/ctrlp.vim' |
|
|
|
|
|
|
|
" select multiple strings at the same time |
|
|
|
Bundle 'terryma/vim-multiple-cursors' |
|
|
|
Bundle 'terryma/vim-multiple-cursors' |
|
|
|
|
|
|
|
" colorscheme |
|
|
|
" powerline settings |
|
|
|
Bundle 'croaker/mustang-vim' |
|
|
|
let g:Powerline_symbols = 'fancy' |
|
|
|
" python support (errors, refactor, etc) |
|
|
|
|
|
|
|
Bundle 'klen/python-mode' |
|
|
|
|
|
|
|
|
|
|
|
" auto-pair settings |
|
|
|
" auto-pair settings |
|
|
|
let g:AutoPairsMapCR = 1 |
|
|
|
let g:AutoPairsMapCR = 1 |
|
|
|
|
|
|
|
|
|
|
|
" fancy tabline (to follow Powerline and BusyBee) |
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" fancy tabline (to follow Powerline color scheme) |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
function PowerTabLine() |
|
|
|
function PowerTabLine() |
|
|
|
let line = '' |
|
|
|
let line = '' |
|
|
|
let currenttab = tabpagenr() |
|
|
|
let currenttab = tabpagenr() |
|
|
@ -232,8 +263,11 @@ endfunction |
|
|
|
|
|
|
|
|
|
|
|
set tabline=%!PowerTabLine() |
|
|
|
set tabline=%!PowerTabLine() |
|
|
|
|
|
|
|
|
|
|
|
" powerline |
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
" Powerline settings |
|
|
|
|
|
|
|
" ---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
python from powerline.vim import setup as powerline_setup |
|
|
|
python from powerline.vim import setup as powerline_setup |
|
|
|
python powerline_setup() |
|
|
|
python powerline_setup() |
|
|
|
python del powerline_setup |
|
|
|
python del powerline_setup |
|
|
|
|
|
|
|
let g:Powerline_symbols = 'fancy' |
|
|
|