annotate .vimrc @ 22:c8ad85e95854 default tip

Some general updates
author Luka Sitas <lsitas@avatarasoftware.com>
date Thu, 16 Jul 2026 14:47:23 -0400
parents 7cc13548becc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
1 " Leader Mappings
a4ec03f77554 I don't know...
luka
parents:
diff changeset
2 map <Space> <leader>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
3 map <Leader>w :update<CR>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
4 map <Leader>q :qall<CR>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
5 set mouse=a
a4ec03f77554 I don't know...
luka
parents:
diff changeset
6 inoremap <C-a> <C-x><C-i>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
7
9
17c557de03e0 Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents: 7
diff changeset
8 colorscheme desert
17c557de03e0 Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents: 7
diff changeset
9
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
10 " Support for tags closing and classes
17
412c33afd395 Update for core and some minor fixes
Luka Sitas <lsitas@avatarasoftware.com>
parents: 16
diff changeset
11 source $HOME/.vim/plugins/core/core.vim
10
b95a8e2525cc Better vim-ai support for local model on edit
Luka Sitas <lsitas@avatarasoftware.com>
parents: 9
diff changeset
12 source $HOME/.vim/plugins/vim-ai.vim
11
eeda6b1401ae changing files to .vim
luka
parents: 7
diff changeset
13 source $HOME/.vim/plugins/taghelp.vim
6
3017fd33ad8b Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents: 5
diff changeset
14 source $HOME/.vim/plugins/hghelp/hghelp.vim
7
34930197e9d4 Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents: 6
diff changeset
15 source $HOME/.vim/plugins/globalsearch.vim
18
203279635445 Adding in the voice note ability. It's not perfect but it is working.
Luka Sitas <lsitas@avatarasoftware.com>
parents: 17
diff changeset
16 source $HOME/.vim/plugins/voicenote/voicenote.vim
7
34930197e9d4 Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents: 6
diff changeset
17
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
18 syntax on
a4ec03f77554 I don't know...
luka
parents:
diff changeset
19 syntax enable
22
c8ad85e95854 Some general updates
Luka Sitas <lsitas@avatarasoftware.com>
parents: 20
diff changeset
20
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
21 " File types
a4ec03f77554 I don't know...
luka
parents:
diff changeset
22 autocmd Filetype scss if getfsize(@%) > 300 | setlocal syntax=OFF | endif
a4ec03f77554 I don't know...
luka
parents:
diff changeset
23 highlight Comment cterm=italic gui=italic
a4ec03f77554 I don't know...
luka
parents:
diff changeset
24 autocmd FileType *.blade.php setlocal commentstring=#\ %s
20
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
25 autocmd BufNewFile,BufRead *.php set iskeyword+=$
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
26
7
34930197e9d4 Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents: 6
diff changeset
27 set path+=**
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
28 set nowrap " Dont wrap
a4ec03f77554 I don't know...
luka
parents:
diff changeset
29 set backspace=indent,eol,start " http://vi.stackexchange.com/a/2163
a4ec03f77554 I don't know...
luka
parents:
diff changeset
30 set laststatus=2 " Show status line on startup
a4ec03f77554 I don't know...
luka
parents:
diff changeset
31 set splitright " Open new splits to the right
a4ec03f77554 I don't know...
luka
parents:
diff changeset
32 set splitbelow " Open new splits to the bottom
a4ec03f77554 I don't know...
luka
parents:
diff changeset
33 set lazyredraw " Reduce the redraw frequency
a4ec03f77554 I don't know...
luka
parents:
diff changeset
34 set ttyfast " Send more characters in fast terminals
a4ec03f77554 I don't know...
luka
parents:
diff changeset
35 set nobackup nowritebackup noswapfile " Turn off backup files
a4ec03f77554 I don't know...
luka
parents:
diff changeset
36 set noerrorbells novisualbell " Turn off visual and audible bells
19
1c8e1cdb35f7 updating tab space
Luka Sitas <lsitas@avatarasoftware.com>
parents: 18
diff changeset
37 set shiftwidth=4 tabstop=4
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
38 set history=500
a4ec03f77554 I don't know...
luka
parents:
diff changeset
39 set hlsearch " Highlight search results
a4ec03f77554 I don't know...
luka
parents:
diff changeset
40 set ignorecase smartcase " Search queries intelligently set case
a4ec03f77554 I don't know...
luka
parents:
diff changeset
41 set incsearch " Show search results as you type
a4ec03f77554 I don't know...
luka
parents:
diff changeset
42 set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape
a4ec03f77554 I don't know...
luka
parents:
diff changeset
43 set showcmd " Show size of visual selection
a4ec03f77554 I don't know...
luka
parents:
diff changeset
44 set smartindent " Automatic formating/indenting
a4ec03f77554 I don't know...
luka
parents:
diff changeset
45
a4ec03f77554 I don't know...
luka
parents:
diff changeset
46 " Persistent undo
a4ec03f77554 I don't know...
luka
parents:
diff changeset
47 set undodir=~/.vim/undo/
a4ec03f77554 I don't know...
luka
parents:
diff changeset
48 set undofile
a4ec03f77554 I don't know...
luka
parents:
diff changeset
49 set undolevels=1000
a4ec03f77554 I don't know...
luka
parents:
diff changeset
50 set undoreload=10000
a4ec03f77554 I don't know...
luka
parents:
diff changeset
51
a4ec03f77554 I don't know...
luka
parents:
diff changeset
52 " Tags
a4ec03f77554 I don't know...
luka
parents:
diff changeset
53 set tags=./tags,tags;$HOME
a4ec03f77554 I don't know...
luka
parents:
diff changeset
54
a4ec03f77554 I don't know...
luka
parents:
diff changeset
55
a4ec03f77554 I don't know...
luka
parents:
diff changeset
56 "-------------------------------------------------------------------------------
a4ec03f77554 I don't know...
luka
parents:
diff changeset
57 " Interface
a4ec03f77554 I don't know...
luka
parents:
diff changeset
58 "-------------------------------------------------------------------------------
a4ec03f77554 I don't know...
luka
parents:
diff changeset
59
a4ec03f77554 I don't know...
luka
parents:
diff changeset
60 set number " Enable line numbers
a4ec03f77554 I don't know...
luka
parents:
diff changeset
61 set relativenumber " Enable relative line numbers
a4ec03f77554 I don't know...
luka
parents:
diff changeset
62 set scrolloff=5 " Leave 5 lines of buffer when scrolling
a4ec03f77554 I don't know...
luka
parents:
diff changeset
63 set sidescrolloff=10 " Leave 10 characters of horizontal buffer when scrolling
a4ec03f77554 I don't know...
luka
parents:
diff changeset
64
a4ec03f77554 I don't know...
luka
parents:
diff changeset
65
a4ec03f77554 I don't know...
luka
parents:
diff changeset
66 nnoremap <C-Left> :tabprevious<CR>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
67 nnoremap <C-Right> :tabnext<CR>
a4ec03f77554 I don't know...
luka
parents:
diff changeset
68
a4ec03f77554 I don't know...
luka
parents:
diff changeset
69
a4ec03f77554 I don't know...
luka
parents:
diff changeset
70
a4ec03f77554 I don't know...
luka
parents:
diff changeset
71 "-------------------------------------------------------------------------------
a4ec03f77554 I don't know...
luka
parents:
diff changeset
72 " Plugins
a4ec03f77554 I don't know...
luka
parents:
diff changeset
73 "-------------------------------------------------------------------------------
a4ec03f77554 I don't know...
luka
parents:
diff changeset
74 " Ensure that plug-vim is set up
a4ec03f77554 I don't know...
luka
parents:
diff changeset
75 let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
a4ec03f77554 I don't know...
luka
parents:
diff changeset
76 if empty(glob(data_dir . '/autoload/plug.vim'))
a4ec03f77554 I don't know...
luka
parents:
diff changeset
77 silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
a4ec03f77554 I don't know...
luka
parents:
diff changeset
78 autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
a4ec03f77554 I don't know...
luka
parents:
diff changeset
79 endif
a4ec03f77554 I don't know...
luka
parents:
diff changeset
80
a4ec03f77554 I don't know...
luka
parents:
diff changeset
81 call plug#begin()
a4ec03f77554 I don't know...
luka
parents:
diff changeset
82 " Environment Plugins
a4ec03f77554 I don't know...
luka
parents:
diff changeset
83 "
a4ec03f77554 I don't know...
luka
parents:
diff changeset
84 " NERDTree
11
eeda6b1401ae changing files to .vim
luka
parents: 7
diff changeset
85 source $HOME/.vim/plugins/nerdtree.vim
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
86
a4ec03f77554 I don't know...
luka
parents:
diff changeset
87 " Coding and language specifics
a4ec03f77554 I don't know...
luka
parents:
diff changeset
88 "
a4ec03f77554 I don't know...
luka
parents:
diff changeset
89 " LSP - ale
20
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
90 " source $HOME/.vim/plugins/ale.vim
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
91
a4ec03f77554 I don't know...
luka
parents:
diff changeset
92 " Blade
a4ec03f77554 I don't know...
luka
parents:
diff changeset
93 Plug 'jwalton512/vim-blade', { 'for': 'php' }
a4ec03f77554 I don't know...
luka
parents:
diff changeset
94 " Use release branch (recommended)
11
eeda6b1401ae changing files to .vim
luka
parents: 7
diff changeset
95 source $HOME/.vim/plugins/coc.vim
20
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
96 Plug 'phpactor/phpactor', {'for': 'php', 'tag': '*', 'do': 'composer install --no-dev -o'}" Plug 'preservim/tagbar'
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
97
a4ec03f77554 I don't know...
luka
parents:
diff changeset
98 " AI-ify
a4ec03f77554 I don't know...
luka
parents:
diff changeset
99 Plug 'madox2/vim-ai'
a4ec03f77554 I don't know...
luka
parents:
diff changeset
100
22
c8ad85e95854 Some general updates
Luka Sitas <lsitas@avatarasoftware.com>
parents: 20
diff changeset
101 " Local Plugins
c8ad85e95854 Some general updates
Luka Sitas <lsitas@avatarasoftware.com>
parents: 20
diff changeset
102 Plug '/home/lsitas/repos/vim_plugins/dbtables'
c8ad85e95854 Some general updates
Luka Sitas <lsitas@avatarasoftware.com>
parents: 20
diff changeset
103 Plug '/home/lsitas/repos/vim_plugins/core'
c8ad85e95854 Some general updates
Luka Sitas <lsitas@avatarasoftware.com>
parents: 20
diff changeset
104
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
105 call plug#end()
a4ec03f77554 I don't know...
luka
parents:
diff changeset
106
a4ec03f77554 I don't know...
luka
parents:
diff changeset
107 " CTRLP
11
eeda6b1401ae changing files to .vim
luka
parents: 7
diff changeset
108 source $HOME/.vim/plugins/ctrlp.vim
0
a4ec03f77554 I don't know...
luka
parents:
diff changeset
109
a4ec03f77554 I don't know...
luka
parents:
diff changeset
110 " Netwr
a4ec03f77554 I don't know...
luka
parents:
diff changeset
111 set nocp
a4ec03f77554 I don't know...
luka
parents:
diff changeset
112 filetype plugin on " plugins are enabled
a4ec03f77554 I don't know...
luka
parents:
diff changeset
113
a4ec03f77554 I don't know...
luka
parents:
diff changeset
114
a4ec03f77554 I don't know...
luka
parents:
diff changeset
115 " Use project based .vimrc's
a4ec03f77554 I don't know...
luka
parents:
diff changeset
116 set exrc
a4ec03f77554 I don't know...
luka
parents:
diff changeset
117
a4ec03f77554 I don't know...
luka
parents:
diff changeset
118
a4ec03f77554 I don't know...
luka
parents:
diff changeset
119 " Get some better php support for ale see https://github.com/dense-analysis/ale/blob/master/supported-tools.md
20
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
120
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
121
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
122
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
123 " Log current working directory with timestamp to a cache file
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
124 function! LogCwdToCache()
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
125 " Path to your cache file (change if you want)
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
126 let l:cachefile = expand('~/.vim_cwd_cache')
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
127
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
128 " Get timestamp and current working directory
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
129 let l:timestamp = strftime('%Y-%m-%d %H:%M:%S')
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
130 let l:cwd = getcwd()
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
131
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
132 " Append line: "YYYY-MM-DD HH:MM:SS /path/to/dir"
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
133 call writefile([l:timestamp . ' ' . l:cwd], l:cachefile, 'a')
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
134 endfunction
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
135
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
136 " Example mappings/commands to trigger it:
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
137 " Call manually:
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
138 command! LogCwd call LogCwdToCache()
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
139
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
140 " Or log automatically on VimEnter:
7cc13548becc updating coc, prompts and auto loggin
Luka Sitas <lsitas@avatarasoftware.com>
parents: 19
diff changeset
141 autocmd VimEnter * call LogCwdToCache()