1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 21:45:10 +01:00

Re-arranged plugins a bit to fit sections

This commit is contained in:
2020-01-03 16:40:38 +01:00
parent 5d45433739
commit ef567cce7a

167
.vimrc
View File

@@ -12,7 +12,7 @@ set encoding=utf-8
let mapleader="," let mapleader=","
" == vim-plug manages the plugins ================================================ " == vim-plug manages the plugins ==============================================
if empty(glob('~/.vim/autoload/plug.vim')) if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
@@ -22,6 +22,20 @@ endif
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
" == Basics ====================================================================
" Think of sensible.vim as one step above 'nocompatible' mode: a universal
" set of defaults that (hopefully) everyone can agree on.
Plug 'tpope/vim-sensible'
" Rooter changes the working directory to the project root when you open a
" file or directory. Useful when using fzf for example.
Plug 'airblade/vim-rooter'
" Do not echo the project directory
let g:rooter_silent_chdir = 1
" == Window chrome ============================================================= " == Window chrome =============================================================
" Display tags of the current file ordered by scope " Display tags of the current file ordered by scope
@@ -71,10 +85,6 @@ nnoremap <space>gps :Dispatch! git push<CR>
nnoremap <space>gpl :Dispatch! git pull<CR> nnoremap <space>gpl :Dispatch! git pull<CR>
" Think of sensible.vim as one step above 'nocompatible' mode: a universal
" set of defaults that (hopefully) everyone can agree on.
Plug 'tpope/vim-sensible'
" Nice colour scheme " Nice colour scheme
Plug 'kristijanhusak/vim-hybrid-material' Plug 'kristijanhusak/vim-hybrid-material'
@@ -99,13 +109,6 @@ if has('patch-8.0-1364')
endif endif
" Rooter changes the working directory to the project root when you open a
" file or directory. Useful when using fzf for example.
Plug 'airblade/vim-rooter'
" Do not echo the project directory
let g:rooter_silent_chdir = 1
" Full path fuzzy file, buffer, mru, tag, ... finder " Full path fuzzy file, buffer, mru, tag, ... finder
" Quickly open files, fuzzy search on name " Quickly open files, fuzzy search on name
Plug 'ctrlpvim/ctrlp.vim' Plug 'ctrlpvim/ctrlp.vim'
@@ -300,57 +303,57 @@ Plug 'davidhalter/jedi-vim'
" with ~/.dot_no_ycm " with ~/.dot_no_ycm
let skip_ycm=fnamemodify(expand("$MYVIMRC"), ":p:h") . "/.dot_no_ycm" let skip_ycm=fnamemodify(expand("$MYVIMRC"), ":p:h") . "/.dot_no_ycm"
if !filereadable(skip_ycm) " Only load YouCompleteMe if ~/.dot_no_ycm does not exist if !filereadable(skip_ycm) " Only load YouCompleteMe if ~/.dot_no_ycm does not exist
" code-completion engine " code-completion engine
" sudo apt-get install build-essential cmake " sudo apt-get install build-essential cmake
" sudo apt-get install python-dev " sudo apt-get install python-dev
" cd ~/.vim/bundle/YouCompleteMe " cd ~/.vim/bundle/YouCompleteMe
" ./install.py # For C-style languages: ./install.py --clang-completer " ./install.py # For C-style languages: ./install.py --clang-completer
Plug 'ycm-core/YouCompleteMe' Plug 'ycm-core/YouCompleteMe'
" YouCompleteMe interpreter version (should be the same as what YCM was " YouCompleteMe interpreter version (should be the same as what YCM was
" compiled with): " compiled with):
if filereadable('/data/data/com.termux/files/usr/bin/python3') if filereadable('/data/data/com.termux/files/usr/bin/python3')
" Running in Termux " Running in Termux
let g:ycm_server_python_interpreter = '/data/data/com.termux/files/usr/bin/python3' let g:ycm_server_python_interpreter = '/data/data/com.termux/files/usr/bin/python3'
else else
let g:ycm_server_python_interpreter = '/usr/bin/python3' let g:ycm_server_python_interpreter = '/usr/bin/python3'
endif endif
" Debug stuff " Debug stuff
"let g:ycm_server_keep_logfiles = 1 "let g:ycm_server_keep_logfiles = 1
"let g:ycm_server_log_level = 'debug' "let g:ycm_server_log_level = 'debug'
endif endif
if filereadable(skip_ycm) " Only load if YouCompleteMe is not loaded if filereadable(skip_ycm) " Only load if YouCompleteMe is not loaded
if has('nvim') if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else else
Plug 'Shougo/deoplete.nvim' Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp' Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc' Plug 'roxma/vim-hug-neovim-rpc'
endif endif
" deoplete language plugins " deoplete language plugins
" https://github.com/Shougo/deoplete.nvim/wiki/Completion-Sources " https://github.com/Shougo/deoplete.nvim/wiki/Completion-Sources
" python: " python:
Plug 'zchee/deoplete-jedi' Plug 'zchee/deoplete-jedi'
" Many, based on syntax files " Many, based on syntax files
Plug 'Shougo/neco-syntax' Plug 'Shougo/neco-syntax'
" Flow autocompletion for deoplete " Flow autocompletion for deoplete
Plug 'wokalski/autocomplete-flow' Plug 'wokalski/autocomplete-flow'
" You will also need the following for function argument completion: " You will also need the following for function argument completion:
Plug 'Shougo/neosnippet' Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets' Plug 'Shougo/neosnippet-snippets'
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
" Enable tab complete " Enable tab complete
function! s:check_back_space() abort "{{{ function! s:check_back_space() abort "{{{
let col = col('.') - 1 let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s' return !col || getline('.')[col - 1] =~ '\s'
endfunction"}}} endfunction"}}}
inoremap <silent><expr> <TAB> inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" : \ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" : \ <SID>check_back_space() ? "\<TAB>" :
\ deoplete#manual_complete() \ deoplete#manual_complete()
endif endif
@@ -402,32 +405,6 @@ if v:version >= 704
endif endif
" == Writing prose =============================================================
" Distraction-free writing, start with <Leader>V (\V or ,V in this config)
Plug 'junegunn/goyo.vim'
let g:goyo_width = 120
" Help focus on text by dimming other parts a bit
Plug 'junegunn/limelight.vim'
let g:limelight_conceal_ctermfg = 'Grey69'
let g:limelight_conceal_ctermfg = 145
" Helps with writing prose (better line breaks, agnostic on soft line wraps vs
" hard line breaks etc)
Plug 'reedes/vim-pencil'
" Disable automatic formatting, as this automatically merges lines devided by
" 1 hard enter only, which can be annoying
let g:pencil#autoformat = 0
" Do not insert hard line breaks in the middle of a sentence
let g:pencil#wrapModeDefault = 'soft' " default is 'hard'
" Toggle Gogo with Limelight and Pencil together with Ctrl+F11
"map <C-F11> :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
nmap <leader>V :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
" The NERD Commenter: A plugin that allows for easy commenting of code for " The NERD Commenter: A plugin that allows for easy commenting of code for
" many filetypes. " many filetypes.
Plug 'preservim/nerdcommenter' Plug 'preservim/nerdcommenter'
@@ -463,6 +440,30 @@ let g:gutentags_ctags_exclude = ["*.min.*", "build", ".bundle", ".git", "log", "
"let g:gutentags_trace = 1 "let g:gutentags_trace = 1
" == Writing prose =============================================================
" Distraction-free writing, start with <Leader>V (\V or ,V in this config)
Plug 'junegunn/goyo.vim'
let g:goyo_width = 120
" Help focus on text by dimming other parts a bit
Plug 'junegunn/limelight.vim'
let g:limelight_conceal_ctermfg = 'Grey69'
let g:limelight_conceal_ctermfg = 145
" Helps with writing prose (better line breaks, agnostic on soft line wraps vs
" hard line breaks etc)
Plug 'reedes/vim-pencil'
" Disable automatic formatting, as this automatically merges lines devided by
" 1 hard enter only, which can be annoying
let g:pencil#autoformat = 0
" Do not insert hard line breaks in the middle of a sentence
let g:pencil#wrapModeDefault = 'soft' " default is 'hard'
" Toggle Gogo with Limelight and Pencil together with ,V
nmap <leader>V :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
" All of the plugins must be added before the following line " All of the plugins must be added before the following line
call plug#end() call plug#end()
" == End of plugins ============================================================ " == End of plugins ============================================================