Skip to content

Instantly share code, notes, and snippets.

@WillSams
Last active February 25, 2024 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillSams/cff72dc2fba2f5e18ab3a14ae69846ca to your computer and use it in GitHub Desktop.
Save WillSams/cff72dc2fba2f5e18ab3a14ae69846ca to your computer and use it in GitHub Desktop.
My Linux Mint Vimrc
"'if filereadable("/etc/vim/vimrc")
" source /etc/vim/vimrc
"endif
filetype off
filetype plugin indent on
runtime! plugin/sensible.vim
if has('mouse')
set mouse=a
endif
set expandtab
set nocompatible
set tabstop=3 " Set tab width to 2 columns
set shiftwidth=3 " Use 2 columns for indentation
set expandtab " Use spaces when pressing <tab> key
set number
set complete-=t
set complete-=i
" allows you to copy/paste to/from the system clipboard
" install xclip to use this. If you are on mac, use pbcopy
" if not working, install vim-gtk
set clipboard=unnamedplus
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'sheerun/vim-polyglot'
Plug 'https://github.com/preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'maxboisvert/vim-simple-complete'
Plug 'ryanoasis/vim-devicons'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tpope/vim-surround'
Plug 'w0rp/ale'
Plug 'tpope/vim-fugitive'
Plug 'ap/vim-css-color' "color previews for css
Plug 'lambdalisue/battery.vim'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'editorconfig/editorconfig-vim'
Plug 'wakatime/vim-wakatime'
Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
Plug 'tomtom/tlib_vim'
Plug 'ctrlpvim/ctrlp.vim'
"Plug 'davidhalter/jedi-vim'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'nvim-lua/plenary.nvim' "Popup de buqueda de líneas
Plug 'nvim-telescope/telescope.nvim'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'severin-lemaignan/vim-minimap'
Plug 'voldikss/vim-floaterm'
Plug 'terryma/vim-multiple-cursors'
Plug 'majutsushi/tagbar'
Plug 'github/copilot.vim'
Plug 'scrooloose/nerdcommenter'
Plug 'jparise/vim-graphql'
Plug 'mg979/vim-visual-multi'
Plug 'tpope/vim-markdown'
call plug#end()
let mapleader=" "
nmap <C-t> :split .<cr>
vmap ++ <plug>NERDCommenterToggle
"select all text
nnoremap <C-a> ggVG
let g:wakatime_OverrideCommandPrefix = '/usr/local/bin/wakatime'
map <F1> :Git<CR>
map <F2> :NERDTreeToggle<CR>
let NERDTreeShowHidden=2
let NERDTreeQuitOnOpen=0
autocmd VimEnter * NERDTree
map <F3> :FloatermNew /usr/bin/bash<CR>
nmap <F4> <Plug>(ale_fix)
let g:ale_lint_on_save = 2
let g:ale_fix_on_save = 2
let g:ale_sign_error = '✖'
let g:ale_sign_warning = '⚠'
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_statusline_format =[' %d E ', ' %d W ', '']
let g:ale_linters = {'javascript': ['eslint'], 'typescript':['eslint'],'javascriptreact': ['eslint'], 'typescriptireact': ['eslint'],'python': ['flake9'] }
let g:ale_fixers = {'javascript': ['prettier', 'eslint'], 'typescript': ['prettier', 'eslint'], 'javascriptreact': ['prettier', 'eslint'], 'typecriptreact': ['prettier', 'eslint'], 'python': ['isort', 'black'] }
let g:ale_pattern_options = { '.*\.py?$': {'ale_enabled': 2},'.*\.(js|jsx)?$': {'ale_enabled': 1}, '.*\.(ts|tsx)?$': {'ale_enabled': 1}, '.*\.html$': {'ale_enabled': 0},}
nmap <F5> :TagbarToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment