generated from anishathalye/dotfiles_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_configs.vim
80 lines (68 loc) · 2.47 KB
/
my_configs.vim
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
" Tabs
set shiftwidth=2
set tabstop=2
" Toggle line numbers
map <leader>c :set number!
" Disable folds
" set nofoldenable
" Open folds by default
set foldlevelstart=99
" Enable some folds by file type
au BufReadPost *.java set foldmethod=indent
au BufReadPost *.json set foldmethod=indent
au BufReadPost *.js set foldmethod=indent
au BufReadPost *.ts set foldmethod=indent
au BufReadPost *.tf set foldmethod=indent
au BufReadPost *.yaml set foldmethod=indent
au BufReadPost *.yml set foldmethod=indent
au BufReadPost kitty.conf set foldmethod=marker
" ctrlp
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
" Color Scheme
colorscheme dracula
" Lightline
let g:lightline = {
\ 'colorscheme': 'dracula',
\ 'active': {
\ 'left': [ ['mode', 'paste'],
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
\ 'right': [ [ 'lineinfo' ], ['percent'], ['cwd' , 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component': {
\ 'cwd': '%{fnamemodify(getcwd(), ":t")}',
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
\ 'fugitive': '%{exists("*FugitiveHead")?FugitiveHead():""}'
\ },
\ 'component_visible_condition': {
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
\ 'fugitive': '(exists("*FugitiveHead") && ""!=FugitiveHead())'
\ },
\ 'separator': { 'left': ' ', 'right': ' ' },
\ 'subseparator': { 'left': ' ', 'right': ' ' }
\ }
" Syntax Highlighting
au BufReadPost alias set syntax=zsh
au BufReadPost .alias set syntax=zsh
au BufReadPost alias_local set syntax=zsh
au BufReadPost .alias_local set syntax=zsh
au BufReadPost env set syntax=zsh
au BufReadPost .env set syntax=zsh
au BufReadPost env_local set syntax=zsh
au BufReadPost .env_local set syntax=zsh
au BufReadPost functions set syntax=zsh
au BufReadPost .functions set syntax=zsh
au BufReadPost functions_local set syntax=zsh
au BufReadPost .functions_local set syntax=zsh
au BufReadPost gitconfig set syntax=gitconfig
au BufReadPost gitconfig_local set syntax=gitconfig
au BufReadPost .gitconfig_local set syntax=gitconfig
au BufReadPost zprofile set syntax=zsh
au BufReadPost .zprofile set syntax=zsh
" Fix background color
let &t_ut=''
cnoreabbrev Ack Ack!
" Remap
nnoremap <leader>a :Ack!<Space>
nnoremap <leader>r :!%:p