View difference between Paste ID: cipkLbJY and 48B02LKL
SHOW: | | - or go back to the newest paste.
1-
" .vimrc
1+
" .vimrc
2-
2+
3-
3+
4-
" Setup
4+
" Setup
5-
5+
6-
" Leader as a comma
6+
" Leader as a comma
7-
let mapleader = ","
7+
let mapleader = ","
8-
" Use Vim features, not Vi
8+
" Use Vim features, not Vi
9-
set nocompatible
9+
set nocompatible
10-
set encoding=utf-8
10+
set encoding=utf-8
11-
11+
12-
12+
13-
" Set the dimmed colour for Limelight
13+
" Set the dimmed colour for Limelight
14-
" let g:limelight_conceal_ctermfg = 'LightGrey'
14+
" let g:limelight_conceal_ctermfg = 'LightGrey'
15-
15+
16-
" Starts Vundle
16+
" Starts Vundle
17-
set nocompatible              " be iMproved, required
17+
set nocompatible              " be iMproved, required
18-
filetype off                  " required
18+
filetype off                  " required
19-
19+
20-
" set the runtime path to include Vundle and initialize
20+
" set the runtime path to include Vundle and initialize
21-
set rtp+=~/.vim/bundle/Vundle.vim
21+
set rtp+=~/.vim/bundle/Vundle.vim
22-
call vundle#begin()
22+
call vundle#begin()
23-
" alternatively, pass a path where Vundle should install plugins
23+
" alternatively, pass a path where Vundle should install plugins
24-
"call vundle#begin('~/some/path/here')
24+
"call vundle#begin('~/some/path/here')
25-
25+
26-
" let Vundle manage Vundle, required
26+
" let Vundle manage Vundle, required
27-
Plugin 'VundleVim/Vundle.vim'
27+
Plugin 'VundleVim/Vundle.vim'
28-
Plugin 'bling/vim-airline'
28+
Plugin 'bling/vim-airline'
29-
Plugin 'vim-airline/vim-airline-themes'
29+
Plugin 'vim-airline/vim-airline-themes'
30-
Plugin 'altercation/vim-colors-solarized'
30+
Plugin 'altercation/vim-colors-solarized'
31-
Plugin 'bling/vim-bufferline'
31+
Plugin 'bling/vim-bufferline'
32-
Plugin 'tpope/vim-fugitive'
32+
Plugin 'tpope/vim-fugitive'
33-
Plugin 'kien/ctrlp.vim'
33+
Plugin 'kien/ctrlp.vim'
34-
Plugin 'mattn/emmet-vim'
34+
Plugin 'mattn/emmet-vim'
35-
Plugin 'scrooloose/nerdtree'
35+
Plugin 'scrooloose/nerdtree'
36-
Plugin 'cakebaker/scss-syntax.vim'
36+
Plugin 'cakebaker/scss-syntax.vim'
37-
Plugin 'Xuyuanp/nerdtree-git-plugin'
37+
Plugin 'Xuyuanp/nerdtree-git-plugin'
38-
Plugin 'nathanaelkane/vim-indent-guides'
38+
Plugin 'nathanaelkane/vim-indent-guides'
39-
Plugin 'othree/html5.vim'
39+
Plugin 'othree/html5.vim'
40-
Plugin 'ap/vim-css-color'
40+
Plugin 'ap/vim-css-color'
41-
Plugin 'tpope/vim-commentary'
41+
Plugin 'tpope/vim-commentary'
42-
" All of your Plugins must be added before the following line
42+
" All of your Plugins must be added before the following line
43-
call vundle#end()            " required
43+
call vundle#end()            " required
44-
filetype plugin indent on    " required
44+
filetype plugin indent on    " required
45-
" ends Vundle
45+
" ends Vundle
46-
46+
47-
47+
48-
" Syntax highlighting
48+
" Syntax highlighting
49-
49+
50-
" Enable syntax highighting
50+
" Enable syntax highighting
51-
syntax enable
51+
syntax enable
52-
" 256 colours please
52+
" 256 colours please
53-
set t_Co=256
53+
set t_Co=256
54-
" Dark solarized scheme
54+
" Dark solarized scheme
55-
set background=dark
55+
set background=dark
56-
colorscheme solarized
56+
colorscheme solarized
57-
57+
58-
" Emmet setting
58+
" Emmet setting
59-
let g:user_emmet_install_global = 0
59+
let g:user_emmet_install_global = 0
60-
autocmd FileType html,css EmmetInstall
60+
autocmd FileType html,css EmmetInstall
61-
61+
62-
62+
63-
"CtrlP
63+
"CtrlP
64-
let g:ctrlp_map = '<c-p>'
64+
let g:ctrlp_map = '<c-p>'
65-
let g:ctrlp_show_hidden = 1
65+
let g:ctrlp_show_hidden = 1
66-
66+
67-
" Airline
67+
" Airline
68-
let g:airline#extensions#bufferline#enabled = 1
68+
let g:airline#extensions#bufferline#enabled = 1
69-
set laststatus=2
69+
set laststatus=2
70-
70+
71-
let g:airline#extensions#tabline#enabled = 1
71+
let g:airline#extensions#tabline#enabled = 1
72-
let g:airline#extensions#tabline#left_sep = ' '
72+
let g:airline#extensions#tabline#left_sep = ' '
73-
let g:airline#extensions#tabline#left_alt_sep = '|'
73+
let g:airline#extensions#tabline#left_alt_sep = '|'
74-
" Removes the path of the files
74+
" Removes the path of the files
75-
let g:airline#extensions#tabline#fnamemod = ':t'
75+
let g:airline#extensions#tabline#fnamemod = ':t'
76-
76+
77-
let g:airline_theme='powerlineish'
77+
let g:airline_theme='powerlineish'
78-
let g:airline_right_sep=''
78+
let g:airline_right_sep=''
79-
let g:airline_section_z=''
79+
let g:airline_section_z=''
80-
80+
81-
" NERDTree
81+
" NERDTree
82-
82+
83-
" Run NERDTree as soon as we launch Vim...
83+
" Run NERDTree as soon as we launch Vim...
84-
"autocmd vimenter * NERDTree
84+
"autocmd vimenter * NERDTree
85-
"" ...but focus on the file itself, rather than NERDTree
85+
"" ...but focus on the file itself, rather than NERDTree
86-
"autocmd VimEnter * wincmd p
86+
"autocmd VimEnter * wincmd p
87-
" Close Vim if only NERDTree is left open
87+
" Close Vim if only NERDTree is left open
88-
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
88+
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
89-
let NERDTreeShowHidden=1
89+
let NERDTreeShowHidden=1
90-
90+
91-
91+
92-
" Set relevant filetypes
92+
" Set relevant filetypes
93-
" au BufRead,BufNewFile *.scss set filetype=css
93+
" au BufRead,BufNewFile *.scss set filetype=css
94-
au BufRead,BufNewFile *.md set filetype=markdown
94+
au BufRead,BufNewFile *.md set filetype=markdown
95-
au BufRead,BufNewFile *.hbs set filetype=html
95+
au BufRead,BufNewFile *.hbs set filetype=html
96-
96+
97-
97+
98-
" Buffer management
98+
" Buffer management
99-
99+
100-
" Open splits to the right or below; more natural than the default
100+
" Open splits to the right or below; more natural than the default
101-
set splitright
101+
set splitright
102-
set splitbelow
102+
set splitbelow
103-
" Set the working directory to wherever the open file lives (can be problematic)
103+
" Set the working directory to wherever the open file lives (can be problematic)
104-
set autochdir
104+
set autochdir
105-
" set path+=**
105+
" set path+=**
106-
" Show file options above the command line
106+
" Show file options above the command line
107-
set wildmenu
107+
set wildmenu
108-
108+
109-
109+
110-
" Text management
110+
" Text management
111-
111+
112-
filetype plugin indent on
112+
filetype plugin indent on
113-
" 2 spaces please
113+
" 2 spaces please
114-
set expandtab
114+
set expandtab
115-
set shiftwidth=2
115+
set shiftwidth=2
116-
set tabstop=2
116+
set tabstop=2
117-
set softtabstop=2
117+
set softtabstop=2
118-
" Round indent to nearest multiple of 2
118+
" Round indent to nearest multiple of 2
119-
set shiftround
119+
set shiftround
120-
" No line-wrapping
120+
" No line-wrapping
121-
set nowrap
121+
set nowrap
122-
" Spell-check always on
122+
" Spell-check always on
123-
set spell
123+
set spell
124-
" Underscores denote words
124+
" Underscores denote words
125-
set iskeyword-=_
125+
set iskeyword-=_
126-
" No extra spaces when joining lines
126+
" No extra spaces when joining lines
127-
set nojoinspaces
127+
set nojoinspaces
128-
" Interpret numbers with leading zeroes as decimal, not octal
128+
" Interpret numbers with leading zeroes as decimal, not octal
129-
set nrformats=
129+
set nrformats=
130-
130+
131-
"Sets soft wrapping
131+
"Sets soft wrapping
132-
set breakindent
132+
set breakindent
133-
133+
134-
" refreshes buffers when you do git merge  or change fils with git
134+
" refreshes buffers when you do git merge  or change fils with git
135-
set autoread
135+
set autoread
136-
136+
137-
137+
138-
138+
139-
" Interactions
139+
" Interactions
140-
140+
141-
" Start scrolling slightly before the cursor reaches an edge
141+
" Start scrolling slightly before the cursor reaches an edge
142-
set scrolloff=3
142+
set scrolloff=3
143-
set sidescrolloff=5
143+
set sidescrolloff=5
144-
" Scroll sideways a character at a time, rather than a screen at a time
144+
" Scroll sideways a character at a time, rather than a screen at a time
145-
set sidescroll=1
145+
set sidescroll=1
146-
" Allow motions and back-spacing over line-endings etc
146+
" Allow motions and back-spacing over line-endings etc
147-
set backspace=indent,eol,start
147+
set backspace=indent,eol,start
148-
set whichwrap=h,l,b,<,>,~,[,]
148+
set whichwrap=h,l,b,<,>,~,[,]
149-
149+
150-
150+
151-
151+
152-
" Visual decorations
152+
" Visual decorations
153-
153+
154-
" Show status line
154+
" Show status line
155-
set laststatus=2
155+
set laststatus=2
156-
" Show what mode you're currently in
156+
" Show what mode you're currently in
157-
set showmode
157+
set showmode
158-
" Show what commands you're typing
158+
" Show what commands you're typing
159-
set showcmd
159+
set showcmd
160-
" Allow modelines
160+
" Allow modelines
161-
set modeline
161+
set modeline
162-
" Show current line and column position in file
162+
" Show current line and column position in file
163-
set ruler
163+
set ruler
164-
" Show file title in terminal tab
164+
" Show file title in terminal tab
165-
set title
165+
set title
166-
" Show invisibles
166+
" Show invisibles
167-
set list
167+
set list
168-
set listchars=tab:»-,trail:•
168+
set listchars=tab:»-,trail:•
169-
" Set relative line numbers...
169+
" Set relative line numbers...
170-
set relativenumber
170+
set relativenumber
171-
" ...but absolute numbers on the current line
171+
" ...but absolute numbers on the current line
172-
set number
172+
set number
173-
" Limit line-length to 80 columns by highlighting col 81 onward
173+
" Limit line-length to 80 columns by highlighting col 81 onward
174-
set colorcolumn=81
174+
set colorcolumn=81
175-
" Force cursor onto a new line after 80 characters
175+
" Force cursor onto a new line after 80 characters
176-
set textwidth=80
176+
set textwidth=80
177-
" Highlight current line
177+
" Highlight current line
178-
set cursorline
178+
set cursorline
179-
" Mute bells
179+
" Mute bells
180-
set visualbell
180+
set visualbell
181-
181+
182-
182+
183-
183+
184-
" Search
184+
" Search
185-
185+
186-
" Don't keep results highlighted after searching...
186+
" Don't keep results highlighted after searching...
187-
set nohlsearch
187+
set nohlsearch
188-
" ...just highlight as we type
188+
" ...just highlight as we type
189-
" set incsearch
189+
" set incsearch
190-
" Ignore case when searching...
190+
" Ignore case when searching...
191-
set ignorecase
191+
set ignorecase
192-
" ...except if we input a capital letter
192+
" ...except if we input a capital letter
193-
set smartcase
193+
set smartcase
194-
194+
195-
195+
196-
196+
197-
" Abbreviations and auto-completions
197+
" Abbreviations and auto-completions
198-
198+
199-
" lipsum<Tab> drops some Lorem ipsum text into the document
199+
" lipsum<Tab> drops some Lorem ipsum text into the document
200-
iab lipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
200+
iab lipsum Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
201-
201+
202-
" Key mappings
202+
" Key mappings
203-
203+
204-
" jj to throw you into normal mode from insert mode
204+
" jj to throw you into normal mode from insert mode
205-
" inoremap jj <esc>
205+
" inoremap jj <esc>
206-
" jk to throw you into normal mode from insert mode
206+
" jk to throw you into normal mode from insert mode
207-
" inoremap jk <esc>
207+
" inoremap jk <esc>
208-
" Disable arrow keys (hardcore)
208+
" Disable arrow keys (hardcore)
209-
  " map  <up>    <nop>
209+
  " map  <up>    <nop>
210-
  " imap <up>    <nop>
210+
  " imap <up>    <nop>
211-
  " map  <down>  <nop>
211+
  " map  <down>  <nop>
212-
"  imap <down>  <nop>
212+
"  imap <down>  <nop>
213-
"  map  <left>  <nop>
213+
"  map  <left>  <nop>
214-
"  imap <left>  <nop>
214+
"  imap <left>  <nop>
215-
"  map  <right> <nop>
215+
"  map  <right> <nop>
216-
"  map <right> <nop>
216+
"  map <right> <nop>
217-
"  nnoremap <Left> :echoe "Use h"<CR>
217+
"  nnoremap <Left> :echoe "Use h"<CR>
218-
"  nnoremap <Right> :echoe "Use l"<CR>
218+
"  nnoremap <Right> :echoe "Use l"<CR>
219-
"  nnoremap <Up> :echoe "Use k"<CR>
219+
"  nnoremap <Up> :echoe "Use k"<CR>
220-
"  nnoremap <Down> :echoe "Use j"<CR>
220+
"  nnoremap <Down> :echoe "Use j"<CR>
221-
221+
222-
" let mapleader = ","
222+
" let mapleader = ","
223-
223+
224-
"  Set clipboard to unname so I can yy and paste in another app like Atom
224+
"  Set clipboard to unname so I can yy and paste in another app like Atom
225-
set clipboard=unnamed
225+
set clipboard=unnamed
226-
226+
227-
" Send more characters for redraws
227+
" Send more characters for redraws
228-
set ttyfast
228+
set ttyfast
229-
229+
230-
" Enable mouse use in all modes
230+
" Enable mouse use in all modes
231-
set mouse=a
231+
set mouse=a
232-
232+
233-
" Set this to the name of your terminal that supports mouse codes.
233+
" Set this to the name of your terminal that supports mouse codes.
234-
" Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm
234+
" Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm
235-
set ttymouse=xterm2
235+
set ttymouse=xterm2
236-
236+
237-
" Save And quits
237+
" Save And quits
238-
nnoremap <Leader>w :w<CR>
238+
nnoremap <Leader>w :w<CR>
239-
nnoremap <Leader>q :q<CR>
239+
nnoremap <Leader>q :q<CR>
240-
240+
241-
map <Leader>/ gc$<ESC>
241+
map <Leader>/ gc$<ESC>
242-
242+
243-
" Oprns ctrl P
243+
" Oprns ctrl P
244-
nnoremap <Leader>o :CtrlP<CR>
244+
nnoremap <Leader>o :CtrlP<CR>
245-
245+
246-
" Move around buffers
246+
" Move around buffers
247-
nnoremap <Leader>b :bp<CR>
247+
nnoremap <Leader>b :bp<CR>
248-
nnoremap <Leader>f :bn<CR>
248+
nnoremap <Leader>f :bn<CR>
249-
249+
250-
" Insert lines, I am so happy with this one
250+
" Insert lines, I am so happy with this one
251-
map <Enter> o<ESC>
251+
map <Enter> o<ESC>
252-
252+
253-
nnoremap <leader>ev :split $MYVIMRC<CR>
253+
nnoremap <leader>ev :split $MYVIMRC<CR>
254
nnoremap <leader>sv :source $MYVIMRC<CR>