Update for neovim syntax
This commit is contained in:
parent
805ff97a2c
commit
aaced88a1c
4 changed files with 157 additions and 27 deletions
|
|
@ -23,11 +23,13 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
|
|||
alias ls="ls -h --color=auto"
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
alias nv="nvim"
|
||||
alias did="vim +'normal Go' +'r!date' ~/Documents/did.txt"
|
||||
|
||||
alias lcat='pygmentize -g -O style=colorful,linenos=1 | grep -P "^\d\d\d\d:"'
|
||||
alias ccat='pygmentize -g'
|
||||
alias hcat='highlight -n -O ansi --force'
|
||||
alias tcat='highlight -O ansi --force'
|
||||
|
||||
alias dc="docker-compose"
|
||||
|
||||
|
|
|
|||
|
|
@ -109,21 +109,10 @@ function! ToggleJSFormat(...)
|
|||
endfunction
|
||||
|
||||
map <F9> :call ToggleJSFormat(1)<CR>
|
||||
call ToggleJSFormat()
|
||||
"call ToggleJSFormat()
|
||||
|
||||
" autocmd BufNew * if winnr('$') == 1 | tabmove99 | endif
|
||||
|
||||
set hlsearch
|
||||
highlight Search ctermbg=blue ctermfg=white guibg=blue
|
||||
|
||||
filetype on
|
||||
:autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
|
||||
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
highlight OverLength ctermbg=red ctermfg=black guibg=darkred
|
||||
|
||||
highlight ALEError ctermfg=black ctermbg=red guifg=black guibg=red
|
||||
|
||||
au! FileType python setl nosmartindent
|
||||
au BufRead,BufNewFile *.py,*.js,*.jsx,*.nim,*.ml,*.mli match OverLength /\%89v.\+/
|
||||
au BufRead,BufNewFile *.py,*.js,*.jsx,*.nim,*.ml,*.mli 2match ExtraWhiteSpace /\s\+$\|\t/
|
||||
|
|
@ -134,6 +123,9 @@ command C let @/=""
|
|||
command CC :%s#_\(\l\)#\u\1#g
|
||||
command U :%s#\C\(\<\u[a-z0-9]\+\|[a-z0-9]\+\)\(\u\)#\l\1_\l\2#g
|
||||
|
||||
map <Leader>y "*y
|
||||
map <Leader>p "*p
|
||||
|
||||
nmap =j :%!python -m json.tool<CR>
|
||||
|
||||
if !exists("autocommands_loaded")
|
||||
|
|
@ -262,7 +254,8 @@ Plug 'ervandew/supertab'
|
|||
Plug 'simnalamburt/vim-mundo'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'rakr/vim-one'
|
||||
Plug 'alaviss/nim.nvim'
|
||||
Plug 'prabirshrestha/asyncomplete.vim'
|
||||
"Plug 'baabelfish/nvim-nim'
|
||||
call plug#end()
|
||||
|
||||
|
|
@ -270,16 +263,156 @@ let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
|||
set termguicolors
|
||||
|
||||
nnoremap <F6> :MundoToggle<CR>
|
||||
nnoremap riW ciW<C-r>0<ESC>
|
||||
nnoremap riw ciw<C-r>0<ESC>
|
||||
|
||||
"let base16colorspace=256
|
||||
" set background=dark
|
||||
"colorscheme base16-default-dark
|
||||
" ## added by OPAM user-setup for vim / base ## 93ee63e278bdfc07d1139a748ed3fff2 ## you can edit, but keep this line
|
||||
let g:airline_theme='one'
|
||||
"let g:airline_theme='one'
|
||||
set background=dark
|
||||
colorscheme one
|
||||
syntax enable
|
||||
"colorscheme one
|
||||
"let ayucolor="dark" " for dark version of theme
|
||||
"colorscheme ayu
|
||||
|
||||
" Vim color file
|
||||
" vimdefault
|
||||
" Created by Joey with ThemeCreator (https://github.com/mswift42/themecreator)
|
||||
|
||||
|
||||
if exists("syntax on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
set t_Co=256
|
||||
let g:colors_name = "vimdefault"
|
||||
|
||||
|
||||
" Define reusable colorvariables.
|
||||
let s:bg="#000000"
|
||||
let s:fg="#ffffff"
|
||||
let s:fg2="#ebebeb"
|
||||
let s:fg3="#d6d6d6"
|
||||
let s:fg4="#c2c2c2"
|
||||
let s:bg2="#141414"
|
||||
let s:bg3="#292929"
|
||||
let s:bg4="#3d3d3d"
|
||||
let s:keyword="#a65a00"
|
||||
let s:builtin="#10a500"
|
||||
let s:const= "#CC0000"
|
||||
let s:comment="#2d64a4"
|
||||
let s:func="#00a0e2"
|
||||
let s:str="#C40000"
|
||||
let s:type="#3B9B00"
|
||||
let s:ident="#06989A"
|
||||
let s:preproc="#75507B"
|
||||
let s:var="#ffffff"
|
||||
let s:warning="#e81050"
|
||||
let s:warning2="#e86310"
|
||||
let s:parenbg="#3a71c9"
|
||||
|
||||
exe 'hi Normal guifg='s:fg' guibg='s:bg
|
||||
exe 'hi Cursor guifg='s:bg' guibg='s:fg
|
||||
exe 'hi CursorLine guibg='s:bg2
|
||||
exe 'hi CursorColumn guibg='s:bg2
|
||||
exe 'hi ColorColumn guibg='s:bg2
|
||||
exe 'hi LineNr guifg='s:fg2' guibg='s:bg2
|
||||
exe 'hi VertSplit guifg='s:fg3' guibg='s:bg3
|
||||
exe 'hi MatchParen guifg='s:fg' guibg='s:parenbg' gui=none'
|
||||
exe 'hi Pmenu guifg='s:fg' guibg='s:bg2
|
||||
exe 'hi PmenuSel guibg='s:bg3
|
||||
exe 'hi IncSearch guifg='s:bg' guibg='s:keyword
|
||||
exe 'hi Directory guifg='s:const
|
||||
exe 'hi Folded guifg='s:fg4' guibg='s:bg
|
||||
|
||||
exe 'hi Boolean guifg='s:const
|
||||
exe 'hi Character guifg='s:const
|
||||
exe 'hi Comment guifg='s:comment
|
||||
exe 'hi Conditional guifg='s:keyword
|
||||
exe 'hi Constant guifg='s:const
|
||||
exe 'hi Define guifg='s:keyword
|
||||
exe 'hi DiffAdd guifg=#000000 guibg=#ddffdd gui=bold'
|
||||
exe 'hi DiffDelete guifg=#ff0000'
|
||||
exe 'hi DiffChange guibg='s:bg2
|
||||
exe 'hi DiffText guifg=#000000 guibg=#ddddff gui=bold'
|
||||
exe 'hi ErrorMsg guifg='s:warning' guibg='s:bg2' gui=bold'
|
||||
exe 'hi WarningMsg guifg='s:fg' guibg='s:warning2
|
||||
exe 'hi Float guifg='s:const
|
||||
exe 'hi Function guifg='s:func
|
||||
exe 'hi Identifier guifg='s:ident' gui=italic'
|
||||
exe 'hi Keyword guifg='s:keyword' gui=bold'
|
||||
exe 'hi Label guifg='s:var
|
||||
exe 'hi NonText guifg='s:bg4' guibg='s:bg2
|
||||
exe 'hi Number guifg='s:const
|
||||
exe 'hi Operater guifg='s:keyword
|
||||
exe 'hi PreProc guifg='s:preproc
|
||||
exe 'hi Special guifg='s:preproc
|
||||
exe 'hi SpecialKey guifg='s:fg2' guibg='s:bg2
|
||||
exe 'hi Statement guifg='s:keyword
|
||||
exe 'hi StorageClass guifg='s:type' gui=italic'
|
||||
exe 'hi String guifg='s:str
|
||||
exe 'hi Tag guifg='s:keyword
|
||||
exe 'hi Title guifg='s:fg' gui=bold'
|
||||
exe 'hi Todo guifg='s:fg2' gui=inverse,bold'
|
||||
exe 'hi Type guifg='s:type' gui=none'
|
||||
exe 'hi Underlined gui=underline'
|
||||
|
||||
" Ruby Highlighting
|
||||
exe 'hi rubyAttribute guifg='s:builtin
|
||||
exe 'hi rubyLocalVariableOrMethod guifg='s:var
|
||||
exe 'hi rubyGlobalVariable guifg='s:var' gui=italic'
|
||||
exe 'hi rubyInstanceVariable guifg='s:var
|
||||
exe 'hi rubyKeyword guifg='s:keyword
|
||||
exe 'hi rubyKeywordAsMethod guifg='s:keyword' gui=bold'
|
||||
exe 'hi rubyClassDeclaration guifg='s:keyword' gui=bold'
|
||||
exe 'hi rubyClass guifg='s:keyword' gui=bold'
|
||||
exe 'hi rubyNumber guifg='s:const
|
||||
|
||||
" Python Highlighting
|
||||
exe 'hi pythonBuiltinFunc guifg='s:builtin
|
||||
|
||||
" Go Highlighting
|
||||
exe 'hi goBuiltins guifg='s:builtin
|
||||
|
||||
" Javascript Highlighting
|
||||
exe 'hi jsBuiltins guifg='s:builtin
|
||||
exe 'hi jsFunction guifg='s:keyword' gui=bold'
|
||||
exe 'hi jsGlobalObjects guifg='s:type
|
||||
exe 'hi jsAssignmentExps guifg='s:var
|
||||
|
||||
" Html Highlighting
|
||||
exe 'hi htmlLink guifg='s:var' gui=underline'
|
||||
exe 'hi htmlStatement guifg='s:keyword
|
||||
exe 'hi htmlSpecialTagName guifg='s:keyword
|
||||
|
||||
" Markdown Highlighting
|
||||
exe 'hi mkdCode guifg='s:builtin
|
||||
|
||||
set hlsearch
|
||||
highlight Search ctermbg=blue ctermfg=white guibg=#006891 guifg=white
|
||||
highlight IncSearch ctermbg=blue ctermfg=white guifg=#7D008D guibg=white
|
||||
|
||||
filetype on
|
||||
:autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
|
||||
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
|
||||
highlight OverLength ctermbg=red ctermfg=black guibg=#592929
|
||||
|
||||
highlight ALEError ctermfg=black ctermbg=red guifg=black guibg=red
|
||||
highlight ALEErrorSign ctermfg=none ctermbg=black guifg=red guibg=#212121
|
||||
highlight ALEWarning ctermfg=black ctermbg=yellow guifg=black guibg=#a09500
|
||||
highlight ALEWarningSign ctermfg=yellow ctermbg=none guibg=#212121 guifg=#a09500
|
||||
highlight SignColumn ctermbg=darkgrey guibg=#212121
|
||||
|
||||
hi Normal ctermbg=none guibg=none
|
||||
hi NonText ctermbg=none guibg=none
|
||||
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE
|
||||
hi CursorLine cterm=NONE ctermbg=black ctermfg=NONE guibg=black gui=NONE guifg=NONE
|
||||
set noshowmode
|
||||
|
||||
au User asyncomplete_setup call asyncomplete#register_source({
|
||||
\ 'name': 'nim',
|
||||
\ 'whitelist': ['nim'],
|
||||
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
|
||||
\ })
|
||||
|
|
|
|||
11
.vim/python
11
.vim/python
|
|
@ -48,22 +48,13 @@ EOF
|
|||
|
||||
" Generate tags with: ctags -R -f ~/.vim/tags/python24.ctags /usr/lib/python2.4/
|
||||
" ctrl-[ to go to the tag under the cursor, ctrl-T to go back.
|
||||
set tags+=$HOME/.vim/tags/python24.ctags
|
||||
set tags+=$HOME/.vim/tags/python27.ctags
|
||||
|
||||
" Use :make to see syntax errors. (:cn and :cp to move around, :dist to see
|
||||
" all errors)
|
||||
set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
|
||||
set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
|
||||
|
||||
" Execute a selection of code (very cool!)
|
||||
" Use VISUAL to select a range and then hit ctrl-h to execute it.
|
||||
python3 << EOL
|
||||
import vim
|
||||
def EvaluateCurrentRange():
|
||||
eval(compile('\n'.join(vim.current.range),'','exec'),globals())
|
||||
EOL
|
||||
map <C-h> :py EvaluateCurrentRange()
|
||||
|
||||
" Use F7/Shift-F7 to add/remove a breakpoint (pdb.set_trace)
|
||||
" Totally cool.
|
||||
python3 << EOF
|
||||
|
|
|
|||
6
.vimrc
6
.vimrc
|
|
@ -51,6 +51,8 @@ let g:airline_powerline_fonts = 1
|
|||
let g:airline_section_x = ''
|
||||
let g:airline_section_y = ''
|
||||
|
||||
nnoremap riW ciW<C-r>0<ESC>
|
||||
nnoremap riw ciw<C-r>0<ESC>
|
||||
|
||||
set undofile " Save undo's after file closes
|
||||
set undodir=$HOME/.vim/undo " where to save undo histories
|
||||
|
|
@ -226,6 +228,8 @@ inoremap <A-j> <Esc>:tabl<cr>i
|
|||
inoremap <A-h> <Esc>gTi
|
||||
inoremap <A-l> <Esc>gti
|
||||
|
||||
map <Leader>y "*y
|
||||
map <Leader>p "*p
|
||||
|
||||
"set statusline+=%#warningmsg#
|
||||
"set statusline+=%{SyntasticStatuslineFlag()}
|
||||
|
|
@ -271,7 +275,7 @@ Plug 'udalov/kotlin-vim'
|
|||
Plug 'ervandew/supertab'
|
||||
Plug 'simnalamburt/vim-mundo'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'dart-lang/dart-vim-plugin'
|
||||
Plug 'tpope/vim-surround'
|
||||
"Plug 'baabelfish/nvim-nim'
|
||||
call plug#end()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue