Last active
June 14, 2024 11:38
-
-
Save WillSams/cff72dc2fba2f5e18ab3a14ae69846ca to your computer and use it in GitHub Desktop.
My Linux Mint Vimrc
This file contains 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
"'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=2 " Set tab width to 2 columns | |
set shiftwidth=2 " 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' | |
Plug 'habamax/vim-godot' | |
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}} | |
" Enable ALE auto completion globally | |
let g:ale_completion_enabled = 1 | |
" Allow ALE to autoimport completion entries from LSP servers | |
let g:ale_completion_autoimport = 1 | |
" Register LSP server for Godot: | |
call ale#linter#Define('gdscript', { | |
\ 'name': 'godot', | |
\ 'lsp': 'socket', | |
\ 'address': '127.0.0.1:6008', | |
\ 'project_root': 'project.godot', | |
\}) | |
nmap <F5> :TagbarToggle<CR> | |
let g:tagbar_type_gdscript = { | |
\'ctagstype' :'gdscript', | |
\'kinds':[ | |
\'v:variables', | |
\'f:functions', | |
\] | |
\} | |
func! GodotSettings() abort | |
let g:godot_executable = '/home/wsams/.steam/debian-installation/steamapps/common/"Godot Engine"/godot.x11.opt.tools.64' | |
setlocal tabstop=4 | |
setlocal shiftwidth=4 | |
set expandtab | |
nnoremap <buffer> <F6> :GodotRunLast<CR> | |
nnoremap <buffer> <F7> :GodotRun<CR> | |
nnoremap <buffer> <F8> :GodotRunCurrent<CR> | |
nnoremap <buffer> <F9> :GodotRunFZF<CR> | |
endfunc | |
augroup godot | au! | |
au FileType gdscript call GodotSettings() | |
augroup end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment