summaryrefslogtreecommitdiff
path: root/.config/vim
blob: bdfc21137d2a59d5050a17d707c9d81840a4c3fb (plain)
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
" use ~/.config/vim, see https://vi.stackexchange.com/a/20067
set viminfofile=NONE
set runtimepath+=$XDG_DATA_HOME/vim

" double-tap 'j' to enter normal mode
inoremap jj <Esc>

" display 
syntax on
set number
set nowrap

" indentation
set autoindent
set tabstop=4
set shiftwidth=4

set incsearch
set scrolloff=8

" use local modified colorscheme
colorscheme slate_mod

" allow for creating of PDFs with syntax highlighting, via 'HardcopyPdf'
" command, see: https://askubuntu.com/a/1177135
command! -range=% HardcopyPdf <line1>,<line2> hardcopy > %.ps | !ps2pdf %.ps && rm %.ps

" de-clutter
set noswapfile
set nobackup
set noundofile

" recognise custom file extensions
autocmd	BufNewFile,BufRead *.trf set syntax=nroff
autocmd BufNewFile,BufRead *.mail set syntax=mail