-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
76 lines (65 loc) · 2.35 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
67
68
69
70
71
72
73
74
75
76
" General
set nobackup " no backup made
set nowritebackup " no backup while writing
set noswapfile " disables creating swap files
set number " Show line numbers
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=+++ " Wrap-broken line prefix
set textwidth=100 " Line wrap (number of cols)
set showmatch " Highlight matching brace
set spell " Enable spell-checking
set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set ignorecase " Makes pattern matching case-insensitive
set smartcase " Overrides ignorecase if your pattern contains mixed case
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set expandtab " Use spaces instead of tabs
set shiftwidth=2 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=2 " Number of spaces per Tab
set encoding=utf-8
set foldmethod=syntax " permits folding a block by its syntax inferred
set nofoldenable " folding is disabled implicitly
syntax on " Enable syntax highlighting
" Advanced
set ruler " Show row and column ruler information
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
set laststatus=2 " Used for lightline.vim
filetype plugin indent on " filetype plugin for detection and indentation
" runtimepath additions
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.fzf
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'dracula/vim', { 'name': 'dracula' }
Plugin 'w0rp/ale'
Plugin 'itchyny/lightline.vim'
Plugin 'tpope/vim-commentary'
call vundle#end()
" Ale linter configuration. Requires eslint and ruby packages installed
let g:ale_linters = { 'javascript': ['eslint'], 'ruby': ['ruby'] }
" Highlights fenced code blocks within markdown files
let g:markdown_fenced_languages = ['html', 'ruby', 'vim']
" Ag
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
" Dracula theme
try
colorscheme dracula
catch /^Vim\%((\a\+)\)\=:E185/
endtry
" mappings
nnoremap <c-p> :FZF<CR>
nnoremap <c-f> :Ag<CR>
nnoremap <c-b> :!git blame %:p<CR>
nnoremap <c-l> :let @*=expand("%")<CR>
nnoremap <c-n> :let @*=fnamemodify(expand("%"), ":~:.") . ":" . line(".")<CR>
" autocmd
autocmd BufNewFile *.sh 0r ~/skeletons/bash.sh " for new file event matching *.sh