summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc64
1 files changed, 56 insertions, 8 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d25cd9b..c39f4a4 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,4 +1,5 @@
" from https://jamesdixon.dev/posts/a-minimal-vimrc/
+set nocompatible
if filereadable(expand('$VIMRUNTIME/defaults.vim'))
unlet! g:skip_defaults_vim
@@ -83,6 +84,7 @@ noremap k gk
"set scrolloff=999
set shell=/bin/sh
+set hi=500
set novisualbell
set nonumber "show line numbers
set wildmenu "enable a menu that shows tab completion options in the status bar
@@ -112,7 +114,7 @@ set number
set t_Co=256
"set t_Co=0 - switches off all colours
set path+=**
-set nomore
+set more
set colorcolumn=0
set equalalways
set showmode
@@ -133,6 +135,7 @@ Plug 'morhetz/gruvbox'
Plug 'sheerun/vim-polyglot'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-commentary'
+Plug 'davidhalter/jedi'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-sensible'
@@ -151,7 +154,6 @@ Plug 'SirVer/Ultisnips'
Plug 'honza/vim-snippets'
Plug 'pangloss/vim-javascript'
Plug 'fatih/vim-go', { 'tag': '*' }
-Plug 'altercation/vim-colors-solarized'
Plug 'powerman/vim-plugin-AnsiEsc'
"Plug 'majutsushi/tagbar'
call plug#end()
@@ -174,6 +176,17 @@ let test#go#runner = 'gotest'
" To run mypy using vim-dispath -with Dispatch
autocmd FileType python let b:dispatch = 'mypy --ignore-missing-imports'
+" jedo-vim
+let g:jedi#goto_command = "<leader>d"
+let g:jedi#goto_assignments_command = "<leader>g"
+let g:jedi#goto_stubs_command = "<leader>s"
+let g:jedi#goto_definitions_command = ""
+let g:jedi#documentation_command = "K"
+let g:jedi#usages_command = "<leader>n"
+let g:jedi#completions_command = "<C-Space>"
+let g:jedi#rename_command = "<leader>r"
+
+" test
nmap <silent> t<C-n> :TestNearest<CR>
nmap <silent> t<C-f> :TestFile<CR>
nmap <silent> t<C-s> :TestSuite<CR>
@@ -205,8 +218,8 @@ let g:ale_hover_cursor = 1
let g:ale_enabled = 1
let g:ale_sign_column_always = 1
let g:ale_open_list = 0
-let g:ale_set_highlights = 0
-let g:ale_set_signs = 0
+let g:ale_set_highlights = 1
+let g:ale_set_signs = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_echo_cursor = 1
@@ -266,7 +279,7 @@ autocmd BufNewFile,BufReadPost *.md map <leader>jd <Esc>:r! date +"(\%Y-\%m-\%dT
" switch off Coc with Markdown
autocmd FileType markdown let b:coc_suggest_disable = 1
-"syntax on "turn syntax highlighting on
+syntax on "turn syntax highlighting on
filetype plugin indent on "load plugin and indent files associated a detected filetype
runtime macros/matchit.vim "allows jumping between brackets with % in normal mode
@@ -391,13 +404,48 @@ nnoremap <leader>ev <C-w>s<C-w>j<C-w>L:e $MYVIMRC<cr>
"let g:dracula_italic = 0 " this has to be set to 0 to avoid lots of erroneous highlighting (https://github.com/dracula/vim/issues/219)
"let g:dracula_underline = 1
+
" Colorscheme
+
+" this stuff from https://github.com/morhetz/gruvbox/wiki/Terminal-specific
+"Use e 24-bit (true-color) mode in Vim/Neovim when outside tmux.
+"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
+"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
+if (empty($TMUX))
+ if (has("nvim"))
+ "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
+ let $NVIM_TUI_ENABLE_TRUE_COLOR=1
+ endif
+ "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
+ "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
+ " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
+ if (has("termguicolors"))
+ set termguicolors
+ endif
+endif
+
+syntax enable
+let g:solarized_termcolors=256
+
+let g:gruvbox_termcolors=256
+let g:gruvbox_contrast_dark='hard'
+let g:gruvbox_contrast_light='hard'
+let g:gruvbox_hls_cursor='orange'
+let g:gruvbox_sign_column='bg0'
+let g:gruvbox_number_column='bg0'
+let g:gruvbox_invert_signs='0'
+let g:gruvbox_improved_strings='0'
set background=dark
-colorscheme default
+colorscheme gruvbox
" manual highlights
-highlight Visual ctermfg=black ctermbg=LightMagenta
-highlight Comment ctermfg=DarkGray
+" highlight Visual ctermfg=black ctermbg=LightMagenta
+" highlight SignColumn ctermbg=black ctermfg=white
+" highlight Comment ctermfg=DarkGray
+" highlight DiffAdd term=bold ctermfg=yellow ctermbg=black
+" highlight DiffDelete term=bold ctermfg=red ctermbg=black
+" highlight DiffChange term=bold ctermfg=black ctermbg=DarkGreen
+
map <F7> :if exists("g:syntax_on") <Bar>
\ syntax off <Bar>