Mercurial > vim
annotate .vimrc @ 3:951569ccb9c7
Updated the dbtables plugin with a popup for selecting data vs schema.
| author | luka |
|---|---|
| date | Thu, 24 Apr 2025 20:28:09 -0400 |
| parents | 13ee7346431d |
| children | 1a705d7a7521 |
| rev | line source |
|---|---|
| 0 | 1 " Leader Mappings |
| 2 map <Space> <leader> | |
| 3 map <Leader>w :update<CR> | |
| 4 map <Leader>q :qall<CR> | |
| 5 map <Leader>g :term gpt<CR> | |
| 6 set mouse=a | |
| 7 inoremap <C-a> <C-x><C-i> | |
| 8 | |
| 9 " Support for tags closing and classes | |
| 10 source $HOME/.vim/plugins/taghelp | |
|
2
13ee7346431d
Changed the lcoation of the dbtables plugin. Added support for visual select sql execution.
luka
parents:
1
diff
changeset
|
11 source /home/luka/.vim/plugins/dbtables/dbtables.vim |
| 0 | 12 |
| 1 | 13 let g:db_user = "budgeter_db_user" " Replace with your default database username |
| 14 let g:db_password = "qSTedfw39(0" " Replace with your default database password | |
| 15 let g:db_name = "budgeter" " Replace with your default database name | |
| 16 let g:db_host = "127.0.0.1" " Replace with your default database name | |
| 17 | |
| 0 | 18 |
| 19 syntax on | |
| 20 syntax enable | |
| 21 " File types | |
| 22 autocmd Filetype scss if getfsize(@%) > 300 | setlocal syntax=OFF | endif | |
| 23 highlight Comment cterm=italic gui=italic | |
| 24 autocmd FileType *.blade.php setlocal commentstring=#\ %s | |
| 25 | |
| 26 set nowrap " Dont wrap | |
| 27 set backspace=indent,eol,start " http://vi.stackexchange.com/a/2163 | |
| 28 set laststatus=2 " Show status line on startup | |
| 29 set splitright " Open new splits to the right | |
| 30 set splitbelow " Open new splits to the bottom | |
| 31 set lazyredraw " Reduce the redraw frequency | |
| 32 set ttyfast " Send more characters in fast terminals | |
| 33 set nobackup nowritebackup noswapfile " Turn off backup files | |
| 34 set noerrorbells novisualbell " Turn off visual and audible bells | |
| 35 "set shiftwidth=2 tabstop=2 " Two spaces for tabs everywhere | |
| 36 set history=500 | |
| 37 set hlsearch " Highlight search results | |
| 38 set ignorecase smartcase " Search queries intelligently set case | |
| 39 set incsearch " Show search results as you type | |
| 40 set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape | |
| 41 set showcmd " Show size of visual selection | |
| 42 set smartindent " Automatic formating/indenting | |
| 43 | |
| 44 " Persistent undo | |
| 45 set undodir=~/.vim/undo/ | |
| 46 set undofile | |
| 47 set undolevels=1000 | |
| 48 set undoreload=10000 | |
| 49 | |
| 50 " Tags | |
| 51 set tags=./tags,tags;$HOME | |
| 52 | |
| 53 | |
| 54 "------------------------------------------------------------------------------- | |
| 55 " Interface | |
| 56 "------------------------------------------------------------------------------- | |
| 57 | |
| 58 set number " Enable line numbers | |
| 59 set relativenumber " Enable relative line numbers | |
| 60 set scrolloff=5 " Leave 5 lines of buffer when scrolling | |
| 61 set sidescrolloff=10 " Leave 10 characters of horizontal buffer when scrolling | |
| 62 | |
| 63 | |
| 64 nnoremap <C-Left> :tabprevious<CR> | |
| 65 nnoremap <C-Right> :tabnext<CR> | |
| 66 | |
| 67 | |
| 68 | |
| 69 "------------------------------------------------------------------------------- | |
| 70 " Plugins | |
| 71 "------------------------------------------------------------------------------- | |
| 72 " Ensure that plug-vim is set up | |
| 73 let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
| 74 if empty(glob(data_dir . '/autoload/plug.vim')) | |
| 75 silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
| 76 autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
| 77 endif | |
| 78 | |
| 79 call plug#begin() | |
| 80 " Environment Plugins | |
| 81 " | |
| 82 " NERDTree | |
| 83 source $HOME/.vim/plugins/nerdtree | |
| 84 | |
| 85 " Coding and language specifics | |
| 86 " | |
| 87 " LSP - ale | |
| 88 source $HOME/.vim/plugins/ale | |
| 89 | |
| 90 " Blade | |
| 91 Plug 'jwalton512/vim-blade', { 'for': 'php' } | |
| 92 " Use release branch (recommended) | |
| 93 source $HOME/.vim/plugins/coc | |
| 94 | |
| 95 " AI-ify | |
| 96 Plug 'madox2/vim-ai' | |
| 97 | |
| 98 call plug#end() | |
| 99 | |
| 100 " CTRLP | |
| 101 source $HOME/.vim/plugins/ctrlp | |
| 102 | |
| 103 " Netwr | |
| 104 set nocp | |
| 105 filetype plugin on " plugins are enabled | |
| 106 | |
| 107 | |
| 108 " Use project based .vimrc's | |
| 109 set exrc | |
| 110 | |
| 111 | |
| 112 " Get some better php support for ale see https://github.com/dense-analysis/ale/blob/master/supported-tools.md |
