-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
86 lines (73 loc) · 1.89 KB
/
Copy path.vimrc
File metadata and controls
86 lines (73 loc) · 1.89 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
filetype indent plugin on
syntax on
set background=dark
colorscheme jellybeans
set wildmenu
set autoindent
set showcmd
set cursorline
set ignorecase
set smartcase
set number relativenumber " hybrid numbers
set splitbelow
set splitright
set mouse=a
set incsearch
set hlsearch
set expandtab
set shiftwidth=2
set textwidth=89
set softtabstop=2
set wrap
" Easy shortcut list:
" <C-n> nerdtree
" <,cc> quick-comment
" <,cu> quick-uncomment
" <F3> timestamp
" <C-j> move down vimsplit
" <C-k> move up vimsplit
" <C-l> move right vimsplit
" <C-h> move left vimsplit
" Leader default is \ but , is easier to reach
let mapleader = ","
" easier vimsplit movement
nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-l> <C-w><C-l>
nnoremap <C-h> <C-w><C-h>
" NerdTree shortcut to ctrl+n
map <C-n> :NERDTreeToggle<CR>
" Reformat code with F7
map <F7> gg=G<C-o><C-o>
" Timestamp insert from C
nmap <F3> i<C-R>=strftime("<%Y-%m-%d %a>")<CR><Esc>
imap <F3> <C-R>=strftime("<%Y-%m-%d %a>")<CR>
" Close VIM if only window left open is nerdtree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" and make it ~purple~ but the theme don't work....wtfffff
" autocmd BufEnter *.md colorscheme purpura
" Add shebangs to .sh files
autocmd BufNewFile *.sh 0r ~/.vim/templates/shell-script
autocmd BufNewFile *.sh normal ji
" Need this for lightline
set laststatus=2
set noshowmode
if !has( 'gui_running')
set t_Co=256
endif
let g:lightline = {
\ 'colorscheme': 'one',
\ }
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'preservim/nerdcommenter'
Plug 'frazrepo/vim-rainbow'
Plug 'https://github.com/airblade/vim-gitgutter'
Plug 'itchyny/lightline.vim'
Plug 'sheerun/vim-polyglot'
Plug 'jelera/vim-javascript-syntax'
Plug 'jceb/vim-orgmode' " super nice for notetaking
Plug 'vim-scripts/utl.vim'
Plug 'tpope/vim-speeddating'
Plug 'gko/vim-coloresque'
call plug#end()