this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 116 lines 3.8 kB view raw
1filetype plugin on 2filetype indent on 3 4syntax on 5 6let mapleader = " " 7 8set clipboard=unnamed " Use system clipboard 9set colorcolumn=80 10set cursorline " Highlight cursor line 11set encoding=utf-8 12set fileencoding=utf-8 13set hlsearch " Highlight search 14set ignorecase " Case-insensitive search 15set laststatus=2 " Always show status line 16set noshowmode " Don't show mode 17set number " Line numbers 18set ruler 19set shiftwidth=2 20set shortmess-=S " Show search match index / count 21set showmatch " Highlight matching brackets 22set smartcase " Case-sensitive search if search contains uppercase 23 " characters 24set smartindent 25set statusline+=%{FugitiveStatusline()} 26set tabstop=2 27 28 29" ale 30nnoremap K :ALEHover<CR> 31" /ale 32 33 34" lightline 35" update colorscheme when system mode changes 36" https://github.com/itchyny/lightline.vim/issues/680#issuecomment-2254283734 37autocmd OptionSet background 38 \ execute 'source' globpath(&rtp, 'autoload/lightline/colorscheme/16color.vim') 39 \ | call lightline#colorscheme() | call lightline#update() 40let g:lightline = { 41 \ 'colorscheme': '16color', 42 \ 'active': { 43 \ 'left': [ [ 'mode', 'paste' ], 44 \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] 45 \ }, 46 \ 'component_function': { 47 \ 'gitbranch': 'FugitiveHead' 48 \ }, 49 \ } 50" /lightline 51 52 53" vim-plug 54" https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation 55let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' 56if empty(glob(data_dir . '/autoload/plug.vim')) 57 silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 58 autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 59endif 60 61" https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation-of-missing-plugins 62if empty(glob('~/.vim/autoload/plug.vim')) 63 silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs 64 \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 65endif 66 67" Run PlugInstall if there are missing plugins 68autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) 69 \| PlugInstall --sync | source $MYVIMRC 70\| endif 71 72call plug#begin() 73Plug 'airblade/vim-gitgutter' 74Plug 'ap/vim-css-color' 75Plug 'dense-analysis/ale' 76Plug 'github/copilot.vim' 77Plug 'itchyny/lightline.vim' 78Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 79Plug 'junegunn/fzf.vim' 80Plug 'preservim/nerdtree' 81Plug 'preservim/vim-indent-guides' 82Plug 'tpope/vim-commentary' 83Plug 'tpope/vim-fugitive' 84Plug 'tpope/vim-sensible' 85Plug 'vimpostor/vim-lumen' 86call plug#end() 87" /vim-plug 88 89 90" ale 91" https://github.com/dense-analysis/ale#completion 92let g:ale_completion_enabled = 1 93" /ale 94 95 96" nerdtree 97 98" https://github.com/preservim/nerdtree/blob/7.1.3/README.markdown#how-can-i-map-a-specific-key-or-shortcut-to-open-nerdtree 99nnoremap <leader>n :NERDTreeFocus<CR> 100nnoremap <C-n> :NERDTree<CR> 101nnoremap <C-t> :NERDTreeToggle<CR> 102nnoremap <C-f> :NERDTreeFind<CR> 103 104" always show hidden files 105let g:NERDTreeShowHidden = 1 106 107" start nerdtree when vim starts with a directory argument 108autocmd StdinReadPre * let s:std_in=1 109autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | 110 \ execute 'NERDTree' argv()[0] | wincmd p | enew | NERDTreeFocus | execute 'cd '.argv()[0] | endif 111 112" exit vim if nerdtree is the only window remaining in the only tab 113" https://github.com/preservim/nerdtree/blob/7.1.3/README.markdown#how-can-i-close-vim-or-a-tab-automatically-when-nerdtree-is-the-last-window 114autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | call feedkeys(":quit\<CR>:\<BS>") | endif 115 116" /nerdtree