diff --git a/.gitignore b/.gitignore index 154ec3f..a5369cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ zsh/distro.base.zsh -vim/autoload/plug.vim -vim/plugged vim/bundle vim/spell diff --git a/prepare.sh b/prepare.sh index 9474264..0ccac28 100644 --- a/prepare.sh +++ b/prepare.sh @@ -46,9 +46,8 @@ fi if [[ ! -f "${HOME}/.vimrc" ]]; then ln -sf ${DOTFILES}/vimrc ${HOME}/.vimrc ln -sf ${DOTFILES}/vim ${HOME}/.vim - # Installing vim-plug - curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - # Installing vim-plug and relative plugins - vim +PlugInstall +qall + mkdir -p ${HOME}/.vim/bundle + git clone https://github.com/VundleVim/Vundle.vim.git ${HOME}/.vim/bundle/Vundle.vim + # Installing vundle and plugins. + vim +PluginInstall +qall fi diff --git a/vim/.netrwhist b/vim/.netrwhist new file mode 100644 index 0000000..e051398 --- /dev/null +++ b/vim/.netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =1 +let g:netrw_dirhist_1='/Users/syntaxerrormmm/.docker/machine/machines' diff --git a/vimrc b/vimrc index 9acd41f..69111d9 100644 --- a/vimrc +++ b/vimrc @@ -1,128 +1,90 @@ -" Gestione plugin con vim-plug -call plug#begin() -Plug 'junegunn/vim-plug' - -Plug 'tpope/vim-sensible' -Plug 'tpope/vim-commentary' - -" Git wrapper -Plug 'tpope/vim-fugitive' - -" File explorer -Plug 'scrooloose/nerdtree' - -" Ansible syntax highlight -Plug 'pearofducks/ansible-vim' -Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'} - -" Blade syntax highlight -Plug 'xsbeats/vim-blade' - -" Solarized theme -Plug 'altercation/vim-colors-solarized' - -" HTML 5 template -Plug 'othree/html5.vim' - -" Vim Airline -Plug 'vim-airline/vim-airline' - -" Vim Airline -Plug 'vim-airline/vim-airline-themes' - -" Vim-latexsuite -Plug 'vim-latex/vim-latex' - -" nerdtree git plugin -Plug 'Xuyuanp/nerdtree-git-plugin' - -" Devicons -Plug 'ryanoasis/vim-devicons' - -Plug 'hashivim/vim-terraform' - -" ALE - linting, fixing and completion -Plug 'dense-analysis/ale' - -" Rust -Plug 'rust-lang/rust.vim' - -" Conqueror of Completion -Plug 'neoclide/coc.nvim', {'branch': 'release'} - -" Vim-plug configuration end -call plug#end() - " Impostazioni di base syntax on set background=dark set modelines=5 set modeline +set incsearch set showcmd set laststatus=2 - -" Riattivo i plugin per i tipi di file -filetype plugin indent on +let g:airline_powerline_fonts = 1 " Override grep set grepprg=grep\ -nH\ $* -" Configurazioni addizionali - -" Nerdtree -let g:NERDTreeNodeDelimiter = "\u00a0" -map :NERDTreeToggle - -" LaTeXsuite - Cambio il tex flavor +" Cambio il tex flavor let g:tex_flavor='latex' -" Airline-theme - Set up airline-theme -let g:airline_powerline_fonts = 1 +" Vundle stuff +set nocompatible +filetype off +" Set runtimepath to include Vundle +set rtp+=~/.vim/bundle/Vundle.vim + +" Vundle configuration begin +call vundle#begin() +" Let vundle manage itself +Plugin 'VundleVim/Vundle.vim' + +" Git wrapper +Plugin 'tpope/vim-fugitive' + +" File explorer +Plugin 'scrooloose/nerdtree' + +" Ansible syntax highlight +Bundle 'chase/vim-ansible-yaml' + +" Blade syntax highlight +Bundle 'xsbeats/vim-blade' + +" Solarized theme +Bundle 'altercation/vim-colors-solarized' + +" HTML 5 template +Bundle 'othree/html5.vim' + +" Vim Airline +Plugin 'vim-airline/vim-airline' + +" Vim Airline +Plugin 'vim-airline/vim-airline-themes' + +" Vim-latexsuite +Plugin 'vim-latex/vim-latex' + +" NERDTree git plugin +Plugin 'Xuyuanp/nerdtree-git-plugin' + +" DevIcons +Plugin 'ryanoasis/vim-devicons' + +" Fuzzy Finder +Plugin 'junegunn/fzf.vim' + +" ALE - Linter and fixers +Plugin 'dense-analysis/ale' + +" Vundle configuration end +call vundle#end() + +" Set up airline-theme let g:airline_theme='dark' -" ALE configurations +" ALE options nmap (ale_next_wrap) + let g:ale_sign_error = '⬥' let g:ale_sign_warning = '⬦' -" Configurazioni per ansible-vim -let g:ansible_unindent_after_newline = 1 - " Configurations for GVim if has('gui_running') - "set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14 - "set guifont = Droid Sans Mono Slashed for Powerline Regular 16,Ubuntu Mono derivative Powerline 14 - set guifont=Fira\ Code\ Nerd\ Font\ 11,Ubuntu\ Mono\ derivative\ Powerline\ 14 - + set guifont=FuraMono\ Nerd\ Font\ Regular\ 13,Ubuntu\ Mono\ derivative\ Powerline\ 14 colorscheme solarized let g:airline_theme='base16' endif -" Completion with Conqueror of Code -" use to trigger completion and navigate to the next complete item -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction +" Riattivo i pluing di tipo +filetype plugin indent on -inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ CheckBackspace() ? "\" : - \ coc#refresh() - -" Conferma scelta con invio -inoremap coc#pum#visible() ? coc#pum#confirm() : "\\=coc#on_enter()\" -" mostra documentazione in preview -nnoremap K :call ShowDocumentation() - -function! ShowDocumentation() - if CocAction('hasProvider', 'hover') - call CocActionAsync('doHover') - else - call feedkeys('K', 'in') - endif -endfunction - -let g:coc_filetype_map = { - \ 'yaml.ansible': 'ansible', - \ } +" Configurazioni addizionali +map :NERDTreeToggle diff --git a/vimrc.new b/vimrc.new new file mode 100644 index 0000000..9acd41f --- /dev/null +++ b/vimrc.new @@ -0,0 +1,128 @@ +" Gestione plugin con vim-plug +call plug#begin() +Plug 'junegunn/vim-plug' + +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-commentary' + +" Git wrapper +Plug 'tpope/vim-fugitive' + +" File explorer +Plug 'scrooloose/nerdtree' + +" Ansible syntax highlight +Plug 'pearofducks/ansible-vim' +Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'} + +" Blade syntax highlight +Plug 'xsbeats/vim-blade' + +" Solarized theme +Plug 'altercation/vim-colors-solarized' + +" HTML 5 template +Plug 'othree/html5.vim' + +" Vim Airline +Plug 'vim-airline/vim-airline' + +" Vim Airline +Plug 'vim-airline/vim-airline-themes' + +" Vim-latexsuite +Plug 'vim-latex/vim-latex' + +" nerdtree git plugin +Plug 'Xuyuanp/nerdtree-git-plugin' + +" Devicons +Plug 'ryanoasis/vim-devicons' + +Plug 'hashivim/vim-terraform' + +" ALE - linting, fixing and completion +Plug 'dense-analysis/ale' + +" Rust +Plug 'rust-lang/rust.vim' + +" Conqueror of Completion +Plug 'neoclide/coc.nvim', {'branch': 'release'} + +" Vim-plug configuration end +call plug#end() + +" Impostazioni di base +syntax on +set background=dark +set modelines=5 +set modeline +set showcmd +set laststatus=2 + +" Riattivo i plugin per i tipi di file +filetype plugin indent on + +" Override grep +set grepprg=grep\ -nH\ $* + +" Configurazioni addizionali + +" Nerdtree +let g:NERDTreeNodeDelimiter = "\u00a0" +map :NERDTreeToggle + +" LaTeXsuite - Cambio il tex flavor +let g:tex_flavor='latex' + +" Airline-theme - Set up airline-theme +let g:airline_powerline_fonts = 1 +let g:airline_theme='dark' + +" ALE configurations +nmap (ale_next_wrap) +let g:ale_sign_error = '⬥' +let g:ale_sign_warning = '⬦' + +" Configurazioni per ansible-vim +let g:ansible_unindent_after_newline = 1 + +" Configurations for GVim +if has('gui_running') + "set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14 + "set guifont = Droid Sans Mono Slashed for Powerline Regular 16,Ubuntu Mono derivative Powerline 14 + set guifont=Fira\ Code\ Nerd\ Font\ 11,Ubuntu\ Mono\ derivative\ Powerline\ 14 + + colorscheme solarized + let g:airline_theme='base16' +endif + +" Completion with Conqueror of Code +" use to trigger completion and navigate to the next complete item +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : + \ coc#refresh() + +" Conferma scelta con invio +inoremap coc#pum#visible() ? coc#pum#confirm() : "\\=coc#on_enter()\" +" mostra documentazione in preview +nnoremap K :call ShowDocumentation() + +function! ShowDocumentation() + if CocAction('hasProvider', 'hover') + call CocActionAsync('doHover') + else + call feedkeys('K', 'in') + endif +endfunction + +let g:coc_filetype_map = { + \ 'yaml.ansible': 'ansible', + \ }