summary refs log tree commit diff
path: root/vimrc
blob: 0e1d648720c0ebf43cd6eeca122ebb86c047439f (plain) (blame)
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
set encoding=utf-8
scriptencoding utf-8

set ttyfast       " assume fast terminal and send more chars for smooth redraw
set lazyredraw    " don't redraw while executing macros, register and cmds

let &statusline = '[%n] %<%F %m%r%w%y %= (%l,%c) %P of %L'
set laststatus=2           " every window gets a statusline, always(=2)
set scrolloff=5            " scroll edge offset (to keep some context)
set shortmess=a            " abbreviate all(=a) messages when possible
set showcmd                " show last command

" search related settings
set ignorecase smartcase   " case insensitive search if all lowercase
set incsearch              " incrementally move to match and highlight
set hlsearch               " highlight previous search pattern

" backups
set nobackup               " don't create annoying backup files

" complete up to longest match and display the list of possible matches
set wildmode=list:longest

" Plugins
call plug#begin('~/.local/share/nvim/plugged')

Plug 'fatih/vim-go'

Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'mileszs/ack.vim'

Plug 'plasticboy/vim-markdown'

call plug#end()

" configure ack.vim to use silver surfer
let g:ackprg = 'ag --vimgrep --smart-case'

" Python settings
autocmd BufNewFile,BufRead *.py   setlocal tabstop=2 softtabstop=2 shiftwidth=2 textwidth=100 smarttab expandtab

" JSON settings
autocmd BufNewFile,BufRead *.json setlocal tabstop=2 softtabstop=2 expandtab

" Dockerfile settings
autocmd FileType dockerfile set noexpandtab

" mapping
imap jj <Esc>    " Exit on j

syntax off