Mercurial > vim
annotate .vimrc @ 17:412c33afd395
Update for core and some minor fixes
| author | Luka Sitas <lsitas@avatarasoftware.com> |
|---|---|
| date | Fri, 05 Dec 2025 08:48:49 -0500 |
| parents | d30762aa23dd |
| children | 203279635445 |
| rev | line source |
|---|---|
| 0 | 1 " Leader Mappings |
| 2 map <Space> <leader> | |
| 3 map <Leader>w :update<CR> | |
| 4 map <Leader>q :qall<CR> | |
| 5 set mouse=a | |
| 6 inoremap <C-a> <C-x><C-i> | |
| 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 | 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 | 13 source $HOME/.vim/plugins/taghelp.vim |
|
5
4a7bc1c8551b
support for params in queries
Luka Sitas <lsitas@avatarasoftware.com>
parents:
4
diff
changeset
|
14 source $HOME/.vim/plugins/dbtables/dbtables.vim |
|
6
3017fd33ad8b
Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
5
diff
changeset
|
15 source $HOME/.vim/plugins/hghelp/hghelp.vim |
|
7
34930197e9d4
Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
6
diff
changeset
|
16 source $HOME/.vim/plugins/globalsearch.vim |
|
34930197e9d4
Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
6
diff
changeset
|
17 |
| 0 | 18 |
|
6
3017fd33ad8b
Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
5
diff
changeset
|
19 let g:db_user = "" " Replace with your default database username |
|
3017fd33ad8b
Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
5
diff
changeset
|
20 let g:db_password = "" " Replace with your default database password |
|
3017fd33ad8b
Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
5
diff
changeset
|
21 let g:db_name = "" " Replace with your default database name |
|
3017fd33ad8b
Better support for db tables.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
5
diff
changeset
|
22 let g:db_host = "" " Replace with your default database name |
| 1 | 23 |
|
9
17c557de03e0
Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents:
7
diff
changeset
|
24 function! GeneratePhpCtags() |
|
17c557de03e0
Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents:
7
diff
changeset
|
25 let command = 'ctags -R --fields=+aimS --php-kinds=cdfint --languages=php --extras=+q --tag-relative=yes --exclude=".git" --exclude=".hg" --exclude="node_modules" --exclude="composer.phar" --totals=yes' |
|
17c557de03e0
Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents:
7
diff
changeset
|
26 let output = system(command) |
|
17c557de03e0
Updated commit window
Luka Sitas <lsitas@avatarasoftware.com>
parents:
7
diff
changeset
|
27 endfunction |
| 0 | 28 |
| 29 syntax on | |
| 30 syntax enable | |
| 31 " File types | |
| 32 autocmd Filetype scss if getfsize(@%) > 300 | setlocal syntax=OFF | endif | |
| 33 highlight Comment cterm=italic gui=italic | |
| 34 autocmd FileType *.blade.php setlocal commentstring=#\ %s | |
| 35 | |
|
7
34930197e9d4
Updating hg diff tool.
Luka Sitas <lsitas@avatarasoftware.com>
parents:
6
diff
changeset
|
36 set path+=** |
| 0 | 37 set nowrap " Dont wrap |
| 38 set backspace=indent,eol,start " http://vi.stackexchange.com/a/2163 | |
| 39 set laststatus=2 " Show status line on startup | |
| 40 set splitright " Open new splits to the right | |
| 41 set splitbelow " Open new splits to the bottom | |
| 42 set lazyredraw " Reduce the redraw frequency | |
| 43 set ttyfast " Send more characters in fast terminals | |
| 44 set nobackup nowritebackup noswapfile " Turn off backup files | |
| 45 set noerrorbells novisualbell " Turn off visual and audible bells | |
| 46 "set shiftwidth=2 tabstop=2 " Two spaces for tabs everywhere | |
| 47 set history=500 | |
| 48 set hlsearch " Highlight search results | |
| 49 set ignorecase smartcase " Search queries intelligently set case | |
| 50 set incsearch " Show search results as you type | |
| 51 set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape | |
| 52 set showcmd " Show size of visual selection | |
| 53 set smartindent " Automatic formating/indenting | |
| 54 | |
| 55 " Persistent undo | |
| 56 set undodir=~/.vim/undo/ | |
| 57 set undofile | |
| 58 set undolevels=1000 | |
| 59 set undoreload=10000 | |
| 60 | |
| 61 " Tags | |
| 62 set tags=./tags,tags;$HOME | |
| 63 | |
| 64 | |
| 65 "------------------------------------------------------------------------------- | |
| 66 " Interface | |
| 67 "------------------------------------------------------------------------------- | |
| 68 | |
| 69 set number " Enable line numbers | |
| 70 set relativenumber " Enable relative line numbers | |
| 71 set scrolloff=5 " Leave 5 lines of buffer when scrolling | |
| 72 set sidescrolloff=10 " Leave 10 characters of horizontal buffer when scrolling | |
| 73 | |
| 74 | |
| 75 nnoremap <C-Left> :tabprevious<CR> | |
| 76 nnoremap <C-Right> :tabnext<CR> | |
| 77 | |
| 78 | |
| 79 | |
| 80 "------------------------------------------------------------------------------- | |
| 81 " Plugins | |
| 82 "------------------------------------------------------------------------------- | |
| 83 " Ensure that plug-vim is set up | |
| 84 let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
| 85 if empty(glob(data_dir . '/autoload/plug.vim')) | |
| 86 silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
| 87 autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
| 88 endif | |
| 89 | |
| 90 call plug#begin() | |
| 91 " Environment Plugins | |
| 92 " | |
| 93 " NERDTree | |
| 11 | 94 source $HOME/.vim/plugins/nerdtree.vim |
| 0 | 95 |
| 96 " Coding and language specifics | |
| 97 " | |
| 98 " LSP - ale | |
| 11 | 99 source $HOME/.vim/plugins/ale.vim |
| 0 | 100 |
| 101 " Blade | |
| 102 Plug 'jwalton512/vim-blade', { 'for': 'php' } | |
| 103 " Use release branch (recommended) | |
| 11 | 104 source $HOME/.vim/plugins/coc.vim |
| 0 | 105 |
| 106 " AI-ify | |
| 107 Plug 'madox2/vim-ai' | |
| 108 | |
| 4 | 109 " LLama.vim |
| 110 " put before llama.vim loads | |
| 13 | 111 " let g:llama_config = { 'show_info': 0, 'endpoint': 'http://127.0.0.1:8012/infill' } |
| 112 " Plug 'ggml-org/llama.vim' | |
| 4 | 113 |
| 0 | 114 call plug#end() |
| 115 | |
| 116 " CTRLP | |
| 11 | 117 source $HOME/.vim/plugins/ctrlp.vim |
| 0 | 118 |
| 119 " Netwr | |
| 120 set nocp | |
| 121 filetype plugin on " plugins are enabled | |
| 122 | |
| 123 | |
| 124 " Use project based .vimrc's | |
| 125 set exrc | |
| 126 | |
| 127 | |
| 128 " Get some better php support for ale see https://github.com/dense-analysis/ale/blob/master/supported-tools.md |
