-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc_main
93 lines (69 loc) · 4.46 KB
/
vimrc_main
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
set nocompatible "don't need to keep compatibility with Vi
filetype plugin indent on " enable detection, plugins and indenting in one step
syntax on "Turn on syntax highlighting
set background=dark "make vim use colors that look good on a dark background
set showcmd "show incomplete cmds down the bottom
set showmode "show current mode down the bottom
set foldenable "enable folding
set showmatch "set show matching parenthesis
"set noexrc " don't use the local config
"set virtualedit=all "allow the cursor to go in to "invalid" places
set incsearch "find the next match as we type the search
set hlsearch "hilight searches by default
set ignorecase "ignore case when searching
set shiftwidth=4 "number of spaces to use in each autoindent step
set tabstop=4 "two tab spaces
set softtabstop=2 "number of spaces to skip or insert when <BS>ing or <Tab>ing
set expandtab "spaces instead of tabs for better cross-editor compatibility
set smarttab "use shiftwidth and softtabstop to insert or delete (on <BS>) blanks
set cindent "recommended seting for automatic C-style indentation
set autoindent "automatic indentation in non-C files
set nowrap "no wrapping
set copyindent "copy the previous indentation on autoindenting
set backspace=indent,eol,start "allow backspacing over everything in insert mode
set noerrorbells "don't make noise
set shiftround "when at 3 spaces, and I hit > ... go to 4, not 5
set cursorline "underline the current line in the file
set cursorcolumn "highlight the current column. Visible in GUI mode only.
set wildmenu "make tab completion act more like bash
set wildmode=list:longest "tab complete to longest common string, like bash
set mouse-=a "disable mouse automatically entering visual mode
set wrap! "Word wrap on
set bs=2
set number "Show line numbers
set hidden "allow hiding buffers with unsaved changes
set cmdheight=2 "make the command line a little taller to hide "press enter to viem more" text
set laststatus=2
set backupdir=$HOME/.vim/backup//
set directory=$HOME/.vim/backup//
let mapleader = "," "remap leader to ',' which is much easier than '\'
" Open NERDTree with [,d]
map <Leader>d :NERDTreeToggle<CR> :set number<CR>
set pastetoggle=<F2> " Press F2 in insert mode to preserve tabs when pasting from clipboard into terminal
map <F3> :tabp<CR> " next tab
map <F4> :tabn<CR> " previous tab
set list " we do what to show tabs, to ensure we get them
" out of my files
set listchars=tab:»\ ,trail:- " show tabs and trailing
" fun experiment but obviously not my thing.
"map <down> <ESC>:bn<RETURN>
"map <left> <ESC>:NERDTreeToggle<RETURN>
"map <right> <ESC>:Tlist<RETURN>
"map <up> <ESC>:bp<RETURN>
colorscheme vividchalk
set statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v]
" | | | | | | | | | | |
" | | | | | | | | | | + current
" | | | | | | | | | | column
" | | | | | | | | | +-- current line
" | | | | | | | | +-- current % into file
" | | | | | | | +-- current syntax in
" | | | | | | | square brackets
" | | | | | | +-- current fileformat
" | | | | | +-- number of lines
" | | | | +-- preview flag in square brackets
" | | | +-- help flag in square brackets
" | | +-- readonly flag in square brackets
" | +-- rodified flag in square brackets
" +-- full path to file in the buffer
" }