Last active
January 10, 2025 09:39
-
-
Save andybp85/e5075c69d45c6d8d012ea89199935ea6 to your computer and use it in GitHub Desktop.
vim config 2024. needs vim-plug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| syntax on | |
| set nocompatible | |
| set encoding=utf-8 | |
| set ffs=unix,dos,mac | |
| set number | |
| set relativenumber | |
| set ruler | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| set cursorline | |
| hi CursorLine term=bold cterm=bold guibg=Grey40 | |
| set lazyredraw | |
| set backspace=indent,eol,start | |
| set copyindent | |
| set shiftround | |
| set showmatch | |
| set smartcase | |
| set hlsearch | |
| set incsearch | |
| set modelines=1 | |
| set showcmd | |
| set ttimeout | |
| set timeoutlen=1000 ttimeoutlen=0 | |
| set mouse=a | |
| set colorcolumn=120 | |
| set wildmode=longest,list,full | |
| set wildmenu | |
| set wildignore+=*/tmp/*,*.so,*.swp,*.zip | |
| set backup | |
| set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
| set backupskip=/tmp/*,/private/tmp/* | |
| set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
| set writebackup | |
| set conceallevel=1 | |
| let mapleader=" " | |
| cnoreabbrev W w | |
| cnoreabbrev Q q | |
| cnoreabbrev Wq wq | |
| cnoreabbrev WQ wq | |
| nmap <leader>w :w!<cr> | |
| nmap <leader>q :q<cr> | |
| nmap <leader>wa :wa<cr> | |
| nmap <leader>wq :wq<cr> | |
| nmap <leader>qa :qa<cr> | |
| nmap <leader>wqa :wqa<cr> | |
| call plug#begin() | |
| Plug 'tpope/vim-sensible' | |
| Plug 'phanviet/vim-monokai-pro' | |
| Plug 'kien/rainbow_parentheses.vim' | |
| Plug 'bling/vim-airline' | |
| Plug 'elzr/vim-json' | |
| Plug 'Valloric/YouCompleteMe' | |
| Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
| Plug 'junegunn/fzf.vim' | |
| Plug 'dense-analysis/ale' | |
| Plug 'leafgarland/typescript-vim' " TypeScript syntax highlighting | |
| Plug 'peitalin/vim-jsx-typescript' " TSX syntax highlighting | |
| Plug 'Quramy/tsuquyomi' " TypeScript IDE features | |
| call plug#end() | |
| set termguicolors | |
| colorscheme monokai_pro | |
| let g:pymode_python = 'python3' | |
| nmap <leader>t :Files<cr> | |
| " ALE configuration for TypeScript | |
| let b:ale_fixers = { | |
| \ 'python': ['autoimport', 'autopep8'], | |
| \ 'typescript': ['prettier', 'eslint'], | |
| \ 'typescriptreact': ['prettier', 'eslint'], | |
| \} | |
| let g:ale_linters = { | |
| \ 'typescript': ['eslint', 'tsserver'], | |
| \ 'typescriptreact': ['eslint', 'tsserver'], | |
| \} | |
| " let g:ale_fix_on_save = 1 | |
| " | |
| "" Keybindings for TypeScript | |
| nmap <leader>gd :ALEGoToDefinition<cr> " Go to definition | |
| nmap <leader>gr :ALEFindReferences<cr> " Find references | |
| nmap <leader>gi :ALEImport<cr> " Import missing imports | |
| " Enable mouse support and map Cmd+Click (or Ctrl+Click) to go to definition | |
| if has("mac") | |
| nmap <D-LeftMouse> <LeftMouse>:ALEGoToDefinition<cr> | |
| else | |
| nmap <C-LeftMouse> <LeftMouse>:ALEGoToDefinition<cr> | |
| endif | |
| set secure |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
added typescript support using DeepSeek - let's see if this works...