-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.vimrc
More file actions
123 lines (110 loc) · 2.32 KB
/
Copy path.vimrc
File metadata and controls
123 lines (110 loc) · 2.32 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
call plug#begin()
Plug 'itchyny/lightline.vim'
Plug 'ntpeters/vim-better-whitespace'
call plug#end()
filetype plugin indent on
colorscheme silverwind
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
hi Normal guibg=NONE ctermbg=NONE
hi NonText guibg=NONE ctermbg=NONE
syntax on
set autoindent
set autoread
set background=dark
set backspace=indent,eol,start
set cmdheight=1
set modeline
set modelines=4
set exrc
set secure
set complete-=i
set copyindent
set cursorline
set equalalways
set expandtab
set ffs=unix,dos,mac
set foldmethod=marker
set guicursor=""
set hidden
set history=500
set hlsearch
set ignorecase
set incsearch
set lazyredraw
set laststatus=2
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
set mat=2
set mouse=""
set nobackup
set nobomb
set noerrorbells
set nofoldenable
set noshowmode
set noswapfile
set novisualbell
set nowritebackup
set nrformats-=octal
"no longer available in recent versions of neovim
"set pastetoggle=<F2>
set ruler
set sessionoptions-=options
set shiftwidth=2
set showcmd
set showmatch
set scrolloff=3
set sidescrolloff=5
set smartcase
set smartindent
set smarttab
set softtabstop=2
set splitbelow
set splitright
set tabpagemax=50
set tabstop=2
set title
set titleold=""
set timeoutlen=0
set ttimeoutlen=0
set undolevels=1000
set virtualedit=block
set whichwrap+=<,>,h,l
set wildchar=<TAB>
set wildignore+=*~,*.o,*.pyc,.git\*,.hg\*,.svn\*
set wildmenu
set wrap
set wrapscan
" remap <leader>
let mapleader="-"
" Treat long lines as break lines
map j gj
map k gk
" CTRL+x deletes the current line
map <C-X> dd
" CTRL+d duplicates current line
map <C-D> yyp
" :W does sudo save
command! W w !sudo tee % > /dev/null
" Return to last edit position when opening files
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Remove trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
autocmd FileType Makefile set noexpandtab
inoremap <C-U> <C-G>u<C-U>
" Force redraw for lighline (Cygwin issue)
if !empty($CYGWIN)
autocmd VimEnter * redraw
endif
" Let cursor move through wrapped lines
nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk
nnoremap <Down> gj
nnoremap <Up> gk
vnoremap <Down> gj
vnoremap <Up> gk
inoremap <Down> <C-o>gj
inoremap <Up> <C-o>gk
" CTRL-Space to enter/exit insert mode
nnoremap <C-space> i
imap <C-space> <Esc>