Last active
May 2, 2024 15:14
-
-
Save luca-c-xcv/0b747b8b5885027f10b695b5731fb56a to your computer and use it in GitHub Desktop.
vimrc
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
" PLUGIN MANAGER -------------------------------------------- {{{ | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" PLUGIN LIST ----------------------------------------- {{{ | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" Keep Plugin commands between vundle#begin/end. | |
" example | |
"Plugin 'tpope/vim-fugitive' | |
"Plugin 'L9' " plugin from http://vim-scripts.org/vim/scripts.html | |
"Plugin 'git://git.wincent.com/command-t.git' " Git plugin not hosted on GitHub | |
"Plugin 'file:///home/gmarik/path/to/plugin' " git repos on your local machine (i.e. when working on your own plugin) | |
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " The sparkup vim script is in a subdirectory of this repo called vim. Pass the path to set the runtimepath properly. | |
" conflict solver between plugins | |
Plugin 'ascenator/L9', {'name': 'newL9'} | |
" filesystem explorer | |
Plugin 'preservim/nerdtree' | |
" powerline | |
Plugin 'itchyny/lightline.vim' | |
" ALE plugin | |
Plugin 'dense-analysis/ale' | |
" editorconf plugin | |
Plugin 'editorconfig/editorconfig-vim' | |
" coc (conquer of completion) plugin | |
Plugin 'neoclide/coc.nvim' | |
" }}} | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" }}} | |
" SETTINGS ---------------------------------------------------------------- {{{ | |
" set powerline | |
set laststatus=2 | |
" enable mouse support | |
" set mouse=a | |
" syntax highlighting | |
syntax on | |
" line number | |
set number | |
" cursor line highlighting | |
set cursorline | |
:highlight Cursorline ctermbg=black | |
" search pattern highlighting | |
set hlsearch | |
" set space to tab with size 2 | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set autoindent | |
" show matching () [] {} | |
set showmatch | |
" set theme | |
colorscheme desert | |
" enable autocompletation pressing tab | |
set wildmenu | |
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree. | |
autocmd BufEnter * if winnr() == winnr('h') && bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | | |
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif | |
" Start NERDTree when Vim starts with a directory argument. | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | | |
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif | |
" type file detection | |
filetype on | |
filetype plugin on | |
" intent file | |
filetype indent on | |
filetype plugin indent on | |
inoremap <expr> <cr> coc#pum#visible() ? coc#pum#confirm() : "\<CR>" | |
" ALE | |
let g:ale_linters={ | |
\ 'python': ['pylint'], | |
\ 'shell': ['shellcheck'], | |
\} | |
" }}} | |
" MAPPING -------------------------------------------------- {{{ | |
map <C-o> :NERDTreeToggle<CR> | |
" }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment