-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
66 lines (56 loc) · 2.74 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
" Use pathogen to easily modify the runtime path to include all
" plugins under the ~/.vim/bundle directory
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
set nocompatible " Use Vim settings, rather then Vi settings
set nobackup " No backup file
set noswapfile " No backup file
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set nowrap " don't wrap lines
set tabstop=2 " a tab is four spaces
set expandtab
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set number " always show line numbers
set shiftwidth=2 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set pastetoggle=<F2> " Avoid cascading indents when pasting large amounts of text
set laststatus=2 " Always display the status line.
set statusline=%F%m%r%h%w " Status line display
set statusline+=\ %{fugitive#statusline()}
set statusline+=\ [line/col\ %l,%v]
set colorcolumn=80 " Highlight columns > 80
set cursorline " Highlight the current line
" Highlight columns > 80
let &colorcolumn=join(range(81,999),",")
filetype plugin indent on
" , the leader character
let mapleader = ","
if &t_Co >= 256 || has("gui_running")
colorscheme railscasts
endif
if &t_Co > 2 || has("gui_running")
" switch syntax highlighting on, when the terminal has colors
syntax on
endif
:nmap <leader>n :NERDTreeToggle<Enter>
" It clears the search buffer
:nmap <leader>/ :nohlsearch<CR>
" Rspec.vim mappings
map <Leader>t :call RunCurrentSpecFile()<CR>
map <Leader>s :call RunNearestSpec()<CR>
map <Leader>l :call RunLastSpec()<CR>
map <Leader>a :call RunAllSpecs()<CR>
set runtimepath^=~/.vim/bundle/ctrlp.vim
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|bower_components\|tmp\|dist'