forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
77 lines (70 loc) · 2.13 KB
/
Copy path.vimrc
File metadata and controls
77 lines (70 loc) · 2.13 KB
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
77
" Simplified .vimrc compatible with vi (Vim Tiny)
" Note: Many advanced features require full Vim. Install with: sudo apt install vim
" Make Vim more useful
set nocompatible
" Allow cursor keys in insert mode
set esckeys
" Allow backspace in insert mode
set backspace=indent,eol,start
" Optimize for fast terminal connections
set ttyfast
" Add the g flag to search/replace by default
set gdefault
" Centralize backups and swapfiles
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
" Don't create backups when editing files in certain directories
set backupskip=/tmp/*,/private/tmp/*
" Respect modeline in files
set modeline
set modelines=4
" Enable per-directory .vimrc files and disable unsafe commands in them
set exrc
set secure
" Enable line numbers
set number
" Make tabs as wide as two spaces
set tabstop=2
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase
" Highlight dynamically as pattern is typed
set incsearch
" Always show status line
set laststatus=2
" Disable error bells
set noerrorbells
" Don't reset cursor to start of line when moving around.
set nostartofline
" Show the cursor position
set ruler
" Don't show the intro message when starting Vim
set shortmess=atI
" Show the current mode
set showmode
" Show the filename in the window titlebar
set title
" Show the (partial) command as it's being typed
set showcmd
" Start scrolling three lines before the horizontal window border
set scrolloff=3
" Automatic commands (vi Tiny has +autocmd support)
if has("autocmd")
" Enable file type detection
filetype on
" Treat .json files as .js
autocmd BufNewFile,BufRead *.json setfiletype json
" Treat .md files as Markdown
autocmd BufNewFile,BufRead *.md setlocal filetype=markdown
endif
" Features below require full Vim (not available in vi Tiny):
" - colorscheme (requires +syntax and +eval)
" - syntax highlighting (requires +syntax)
" - let commands (requires +eval)
" - function/call (requires +eval)
" - clipboard integration (requires +clipboard)
" - mouse support (requires +mouse)
" - cursorline (requires +syntax)
" - relativenumber (requires +eval for conditionals)
" - custom key mappings with functions (requires +eval)