Use stow as a virtual manager for nvim configurations. setup somf fish functionallity, prticularly with github, fzf, and fastdir, install blsd, initialize a vim wiki.
This commit is contained in:
parent
1c345db4d8
commit
a79d282037
|
|
@ -4,3 +4,4 @@ plugged/
|
|||
dotfiles/.config/tmux/serious
|
||||
|
||||
|
||||
library/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
function ..; cd ..; end
|
||||
function ...; cd ../..; end
|
||||
function ....; cd ../../..; end
|
||||
function .....; cd ../../../..; end
|
||||
|
||||
function d; __fastdir_dirhist -l -n; end
|
||||
abbr -- - 'cd -'
|
||||
|
||||
function 1; __fastdir_cd_num 1; end
|
||||
function 2; __fastdir_cd_num 2; end
|
||||
function 3; __fastdir_cd_num 3; end
|
||||
function 4; __fastdir_cd_num 4; end
|
||||
function 5; __fastdir_cd_num 5; end
|
||||
function 6; __fastdir_cd_num 6; end
|
||||
function 7; __fastdir_cd_num 7; end
|
||||
function 8; __fastdir_cd_num 8; end
|
||||
function 9; __fastdir_cd_num 9; end
|
||||
|
|
@ -29,6 +29,19 @@ if type rg &> /dev/null # Use Ripgrep (Faster than Grep)
|
|||
set FZF_DEFAULT_COMMAND 'rg --files --hidden --follow --glob "!.git/" --glob "!plugged/"'
|
||||
set FZF_CTRL_T_COMMAND 'rg --files --hidden --follow --glob "!.git/" --glob "!plugged/" $dir'
|
||||
end
|
||||
# Alt-c for directory history
|
||||
if type d &> /dev/null # Use <M-c> to fuzzy search directory history
|
||||
set FZF_CTRL_J_COMMAND "__fastdir_dirhist -l -n | awk -v OFS='%s' '{print \$2}' | awk '!x[\$0]++' | fzf-tmux "
|
||||
end
|
||||
# Alt-c for autojump database
|
||||
set FZF_CTRL_O_COMMAND "bat ~/.local/share/autojump/autojump.txt | sort -nr | fzf-tmux +s | awk -F '\t' '{printf \$2}'"
|
||||
set FZF_PREVIEW_FILE_CMD "bat"
|
||||
set FZF_PREVIEW_DIR_CMD "tree"
|
||||
|
||||
bind \cj eval $FZF_CTRL_J_COMMAND
|
||||
bind \co eval $FZF_CTRL_O_COMMAND
|
||||
|
||||
command -v blsd > /dev/null && export FZF_ALT_C_COMMAND='blsd'
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Autojump -> Faster filesystem navigation
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
# Defined in /tmp/fish.sM92eA/d.fish @ line 2
|
||||
function d
|
||||
__fastdir_dirhist -l -n | awk -v OFS='%s' '{print $2}' | awk '!x[$0]++' | fzf-tmux
|
||||
end
|
||||
#test
|
||||
|
|
@ -4,3 +4,4 @@ tuvistavie/fish-completion-helpers
|
|||
~/.config/fish/fisher/fish-utils
|
||||
~/.config/fish/fisher/fish-audio
|
||||
~/.config/fish/fisher/fish-fzf
|
||||
danhper/fish-fastdir
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
function __fastdir_cd_num
|
||||
if not count $argv > /dev/null
|
||||
echo "need directory name"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l current_dir_num (math (count $dirprev) + 1)
|
||||
set -l dir_diff (math $argv[1] - $current_dir_num)
|
||||
|
||||
if test $dir_diff -gt 0
|
||||
if test $dir_diff -gt (count $dirnext)
|
||||
set dir_diff (count $dirnext)
|
||||
end
|
||||
return (nextd $dir_diff)
|
||||
else if test $dir_diff -lt 0
|
||||
set dir_diff (math 0 - $dir_diff)
|
||||
if test $dir_diff -gt (count $dirprev)
|
||||
set dir_diff (count $dirprev)
|
||||
end
|
||||
return (prevd $dir_diff)
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
function __fastdir_dirhist --description "Print the current directory history (the back- and fwd- lists)"
|
||||
if count $argv > /dev/null
|
||||
switch $argv[1]
|
||||
case -h --h --he --hel --help
|
||||
__fish_print_help dirh
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
# Avoid set comment
|
||||
set -l current (command pwd)
|
||||
set -l separator " "
|
||||
set -l line_len (math (count $dirprev) + (echo $dirprev $current $dirnext | wc -m) )
|
||||
set -l line_num false
|
||||
if test $line_len -gt $COLUMNS
|
||||
# Print one entry per line if history is long
|
||||
set separator "\n"
|
||||
end
|
||||
|
||||
if count $argv > /dev/null
|
||||
for i in (seq (count $argv))
|
||||
switch $argv[$i]
|
||||
case '-l' --l --lo --lon --long
|
||||
set separator "\n"
|
||||
continue
|
||||
case '-n' --n --nu --num --numb --numbe --number
|
||||
set line_num true
|
||||
continue
|
||||
case '-*'
|
||||
printf (_ "%s: Unknown option %s\n" ) nextd $argv[$i]
|
||||
return 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
set -l current_line 0
|
||||
|
||||
# BSD seq 0 outputs '1 0' instead of nothing
|
||||
if count $dirprev > /dev/null
|
||||
for i in (seq (count $dirprev))
|
||||
if test $line_num = true
|
||||
echo -n "$i "
|
||||
end
|
||||
echo -n -e $dirprev[$i]$separator
|
||||
set current_line $i
|
||||
end
|
||||
end
|
||||
|
||||
set_color $fish_color_history_current
|
||||
if test $line_num = true
|
||||
set current_line (math $current_line + 1)
|
||||
echo -n "$current_line "
|
||||
end
|
||||
echo -n -e $current$separator
|
||||
set_color normal
|
||||
|
||||
# BSD seq 0 outputs '1 0' instead of nothing
|
||||
if count $dirnext > /dev/null
|
||||
for i in (seq (echo (count $dirnext)) -1 1)
|
||||
if test $line_num = true
|
||||
set -l line (math (count $dirnext) - $i + $current_line + 1)
|
||||
echo -n "$line "
|
||||
end
|
||||
echo -n -e $dirnext[$i]$separator
|
||||
end
|
||||
end
|
||||
|
||||
if test $separator != "\n"
|
||||
echo
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
/home/ygg/.config/fish/fisher/fish-fzf/d.fish
|
||||
|
|
@ -1 +1 @@
|
|||
/home/ygg/.local/share/omf/themes/serious/fish_prompt.fish
|
||||
/home/ygg/.local/share/omf/themes/gentoo/fish_prompt.fish
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
.netrwhist
|
||||
remote/
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/after
|
||||
|
|
@ -1,284 +0,0 @@
|
|||
" Vim syntax file
|
||||
" Language: C Additions
|
||||
" Maintainer: Mikhail Wolfson <mywolfson@gmail.com>
|
||||
" URL: http://web.mit.edu/wolfsonm
|
||||
" Last Change: 2010 Dec. 3
|
||||
" Version: 0.4
|
||||
"
|
||||
" Changelog:
|
||||
" 0.4 - updates and fixes to cDelimiter to fix break with foldmethod=syntax,
|
||||
" entirely suggested and solved by Ivan Freitas
|
||||
" <ivansichfreitas@gmail.com>
|
||||
" 0.3 - updates and fixes to cUserFunctionPointer, thanks to
|
||||
" Alexei <lxmzhv@gmail.com>
|
||||
" 0.2 - change [] to operator
|
||||
" 0.1 - initial upload, modification from vimscript#1201, Extended c.vim
|
||||
|
||||
|
||||
" Common ANSI-standard functions
|
||||
syn keyword cAnsiFunction MULU_ DIVU_ MODU_ MUL_ DIV_ MOD_
|
||||
syn keyword cAnsiFunction main typeof
|
||||
syn keyword cAnsiFunction open close read write lseek dup dup2
|
||||
syn keyword cAnsiFunction fcntl ioctl
|
||||
syn keyword cAnsiFunction wctrans towctrans towupper
|
||||
syn keyword cAnsiFunction towlower wctype iswctype
|
||||
syn keyword cAnsiFunction iswxdigit iswupper iswspace
|
||||
syn keyword cAnsiFunction iswpunct iswprint iswlower
|
||||
syn keyword cAnsiFunction iswgraph iswdigit iswcntrl
|
||||
syn keyword cAnsiFunction iswalpha iswalnum wcsrtombs
|
||||
syn keyword cAnsiFunction mbsrtowcs wcrtomb mbrtowc
|
||||
syn keyword cAnsiFunction mbrlen mbsinit wctob
|
||||
syn keyword cAnsiFunction btowc wcsfxtime wcsftime
|
||||
syn keyword cAnsiFunction wmemset wmemmove wmemcpy
|
||||
syn keyword cAnsiFunction wmemcmp wmemchr wcstok
|
||||
syn keyword cAnsiFunction wcsstr wcsspn wcsrchr
|
||||
syn keyword cAnsiFunction wcspbrk wcslen wcscspn
|
||||
syn keyword cAnsiFunction wcschr wcsxfrm wcsncmp
|
||||
syn keyword cAnsiFunction wcscoll wcscmp wcsncat
|
||||
syn keyword cAnsiFunction wcscat wcsncpy wcscpy
|
||||
syn keyword cAnsiFunction wcstoull wcstoul wcstoll
|
||||
syn keyword cAnsiFunction wcstol wcstold wcstof
|
||||
syn keyword cAnsiFunction wcstod ungetwc putwchar
|
||||
syn keyword cAnsiFunction putwc getwchar getwc
|
||||
syn keyword cAnsiFunction fwide fputws fputwc
|
||||
syn keyword cAnsiFunction fgetws fgetwc wscanf
|
||||
syn keyword cAnsiFunction wprintf vwscanf vwprintf
|
||||
syn keyword cAnsiFunction vswscanf vswprintf vfwscanf
|
||||
syn keyword cAnsiFunction vfwprintf swscanf swprintf
|
||||
syn keyword cAnsiFunction fwscanf fwprintf zonetime
|
||||
syn keyword cAnsiFunction strfxtime strftime localtime
|
||||
syn keyword cAnsiFunction gmtime ctime asctime
|
||||
syn keyword cAnsiFunction time mkxtime mktime
|
||||
syn keyword cAnsiFunction difftime clock strlen
|
||||
syn keyword cAnsiFunction strerror memset strtok
|
||||
syn keyword cAnsiFunction strstr strspn strrchr
|
||||
syn keyword cAnsiFunction strpbrk strcspn strchr
|
||||
syn keyword cAnsiFunction memchr strxfrm strncmp
|
||||
syn keyword cAnsiFunction strcoll strcmp memcmp
|
||||
syn keyword cAnsiFunction strncat strcat strncpy
|
||||
syn keyword cAnsiFunction strcpy memmove memcpy
|
||||
syn keyword cAnsiFunction wcstombs mbstowcs wctomb
|
||||
syn keyword cAnsiFunction mbtowc mblen lldiv
|
||||
syn keyword cAnsiFunction ldiv div llabs
|
||||
syn keyword cAnsiFunction labs abs qsort
|
||||
syn keyword cAnsiFunction bsearch system getenv
|
||||
syn keyword cAnsiFunction exit atexit abort
|
||||
syn keyword cAnsiFunction realloc malloc free
|
||||
syn keyword cAnsiFunction calloc srand rand
|
||||
syn keyword cAnsiFunction strtoull strtoul strtoll
|
||||
syn keyword cAnsiFunction strtol strtold strtof
|
||||
syn keyword cAnsiFunction strtod atoll atol
|
||||
syn keyword cAnsiFunction atoi atof perror
|
||||
syn keyword cAnsiFunction ferror feof clearerr
|
||||
syn keyword cAnsiFunction rewind ftell fsetpos
|
||||
syn keyword cAnsiFunction fseek fgetpos fwrite
|
||||
syn keyword cAnsiFunction fread ungetc puts
|
||||
syn keyword cAnsiFunction putchar putc gets
|
||||
syn keyword cAnsiFunction getchar getc fputs
|
||||
syn keyword cAnsiFunction fputc fgets fgetc
|
||||
syn keyword cAnsiFunction vsscanf vsprintf vsnprintf
|
||||
syn keyword cAnsiFunction vscanf vprintf vfscanf
|
||||
syn keyword cAnsiFunction vfprintf sscanf sprintf
|
||||
syn keyword cAnsiFunction snprintf scanf printf
|
||||
syn keyword cAnsiFunction fscanf fprintf setvbuf
|
||||
syn keyword cAnsiFunction setbuf freopen fopen
|
||||
syn keyword cAnsiFunction fflush fclose tmpnam
|
||||
syn keyword cAnsiFunction tmpfile rename remove
|
||||
syn keyword cAnsiFunction offsetof va_start va_end
|
||||
syn keyword cAnsiFunction va_copy va_arg raise signal
|
||||
syn keyword cAnsiFunction longjmp setjmp isunordered
|
||||
syn keyword cAnsiFunction islessgreater islessequal isless
|
||||
syn keyword cAnsiFunction isgreaterequal isgreater fmal
|
||||
syn keyword cAnsiFunction fmaf fma fminl
|
||||
syn keyword cAnsiFunction fminf fmin fmaxl
|
||||
syn keyword cAnsiFunction fmaxf fmax fdiml
|
||||
syn keyword cAnsiFunction fdimf fdim nextafterxl
|
||||
syn keyword cAnsiFunction nextafterxf nextafterx nextafterl
|
||||
syn keyword cAnsiFunction nextafterf nextafter nanl
|
||||
syn keyword cAnsiFunction nanf nan copysignl
|
||||
syn keyword cAnsiFunction copysignf copysign remquol
|
||||
syn keyword cAnsiFunction remquof remquo remainderl
|
||||
syn keyword cAnsiFunction remainderf remainder fmodl
|
||||
syn keyword cAnsiFunction fmodf fmod truncl
|
||||
syn keyword cAnsiFunction truncf trunc llroundl
|
||||
syn keyword cAnsiFunction llroundf llround lroundl
|
||||
syn keyword cAnsiFunction lroundf lround roundl
|
||||
syn keyword cAnsiFunction roundf round llrintl
|
||||
syn keyword cAnsiFunction llrintf llrint lrintl
|
||||
syn keyword cAnsiFunction lrintf lrint rintl
|
||||
syn keyword cAnsiFunction rintf rint nearbyintl
|
||||
syn keyword cAnsiFunction nearbyintf nearbyint floorl
|
||||
syn keyword cAnsiFunction floorf floor ceill
|
||||
syn keyword cAnsiFunction ceilf ceil tgammal
|
||||
syn keyword cAnsiFunction tgammaf tgamma lgammal
|
||||
syn keyword cAnsiFunction lgammaf lgamma erfcl
|
||||
syn keyword cAnsiFunction erfcf erfc erfl
|
||||
syn keyword cAnsiFunction erff erf sqrtl
|
||||
syn keyword cAnsiFunction sqrtf sqrt powl
|
||||
syn keyword cAnsiFunction powf pow hypotl
|
||||
syn keyword cAnsiFunction hypotf hypot fabsl
|
||||
syn keyword cAnsiFunction fabsf fabs cbrtl
|
||||
syn keyword cAnsiFunction cbrtf cbrt scalblnl
|
||||
syn keyword cAnsiFunction scalblnf scalbln scalbnl
|
||||
syn keyword cAnsiFunction scalbnf scalbn modfl
|
||||
syn keyword cAnsiFunction modff modf logbl
|
||||
syn keyword cAnsiFunction logbf logb log2l
|
||||
syn keyword cAnsiFunction log2f log2 log1pl
|
||||
syn keyword cAnsiFunction log1pf log1p log10l
|
||||
syn keyword cAnsiFunction log10f log10 logl
|
||||
syn keyword cAnsiFunction logf log ldexpl
|
||||
syn keyword cAnsiFunction ldexpf ldexp ilogbl
|
||||
syn keyword cAnsiFunction ilogbf ilogb frexpl
|
||||
syn keyword cAnsiFunction frexpf frexp expm1l
|
||||
syn keyword cAnsiFunction expm1f expm1 exp2l
|
||||
syn keyword cAnsiFunction exp2f exp2 expl
|
||||
syn keyword cAnsiFunction expf exp tanhl
|
||||
syn keyword cAnsiFunction tanhf tanh sinhl
|
||||
syn keyword cAnsiFunction sinhf sinh coshl
|
||||
syn keyword cAnsiFunction coshf cosh atanhl
|
||||
syn keyword cAnsiFunction atanhf atanh asinhl
|
||||
syn keyword cAnsiFunction asinhf asinh acoshl
|
||||
syn keyword cAnsiFunction acoshf acosh tanl
|
||||
syn keyword cAnsiFunction tanf tan sinl
|
||||
syn keyword cAnsiFunction sinf sin cosl
|
||||
syn keyword cAnsiFunction cosf cos atan2l
|
||||
syn keyword cAnsiFunction atan2f atan2 atanl
|
||||
syn keyword cAnsiFunction atanf atan asinl
|
||||
syn keyword cAnsiFunction asinf asin acosl
|
||||
syn keyword cAnsiFunction acosf acos signbit
|
||||
syn keyword cAnsiFunction isnormal isnan isinf
|
||||
syn keyword cAnsiFunction isfinite fpclassify localeconv
|
||||
syn keyword cAnsiFunction setlocale wcstoumax wcstoimax
|
||||
syn keyword cAnsiFunction strtoumax strtoimax feupdateenv
|
||||
syn keyword cAnsiFunction fesetenv feholdexcept fegetenv
|
||||
syn keyword cAnsiFunction fesetround fegetround fetestexcept
|
||||
syn keyword cAnsiFunction fesetexceptflag feraiseexcept fegetexceptflag
|
||||
syn keyword cAnsiFunction feclearexcept toupper tolower
|
||||
syn keyword cAnsiFunction isxdigit isupper isspace
|
||||
syn keyword cAnsiFunction ispunct isprint islower
|
||||
syn keyword cAnsiFunction isgraph isdigit iscntrl
|
||||
syn keyword cAnsiFunction isalpha isalnum creall
|
||||
syn keyword cAnsiFunction crealf creal cprojl
|
||||
syn keyword cAnsiFunction cprojf cproj conjl
|
||||
syn keyword cAnsiFunction conjf conj cimagl
|
||||
syn keyword cAnsiFunction cimagf cimag cargl
|
||||
syn keyword cAnsiFunction cargf carg csqrtl
|
||||
syn keyword cAnsiFunction csqrtf csqrt cpowl
|
||||
syn keyword cAnsiFunction cpowf cpow cabsl
|
||||
syn keyword cAnsiFunction cabsf cabs clogl
|
||||
syn keyword cAnsiFunction clogf clog cexpl
|
||||
syn keyword cAnsiFunction cexpf cexp ctanhl
|
||||
syn keyword cAnsiFunction ctanhf ctanh csinhl
|
||||
syn keyword cAnsiFunction csinhf csinh ccoshl
|
||||
syn keyword cAnsiFunction ccoshf ccosh catanhl
|
||||
syn keyword cAnsiFunction catanhf catanh casinhl
|
||||
syn keyword cAnsiFunction casinhf casinh cacoshl
|
||||
syn keyword cAnsiFunction cacoshf cacosh ctanl
|
||||
syn keyword cAnsiFunction ctanf ctan csinl
|
||||
syn keyword cAnsiFunction csinf csin ccosl
|
||||
syn keyword cAnsiFunction ccosf ccos catanl
|
||||
syn keyword cAnsiFunction catanf catan casinl
|
||||
syn keyword cAnsiFunction casinf casin cacosl
|
||||
syn keyword cAnsiFunction cacosf cacos assert
|
||||
syn keyword cAnsiFunction UINTMAX_C INTMAX_C UINT64_C
|
||||
syn keyword cAnsiFunction UINT32_C UINT16_C UINT8_C
|
||||
syn keyword cAnsiFunction INT64_C INT32_C INT16_C INT8_C
|
||||
|
||||
" Common ANSI-standard Names
|
||||
syn keyword cAnsiName PRId8 PRIi16 PRIo32 PRIu64
|
||||
syn keyword cAnsiName PRId16 PRIi32 PRIo64 PRIuLEAST8
|
||||
syn keyword cAnsiName PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16
|
||||
syn keyword cAnsiName PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32
|
||||
syn keyword cAnsiName PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64
|
||||
syn keyword cAnsiName PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8
|
||||
syn keyword cAnsiName PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16
|
||||
syn keyword cAnsiName PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32
|
||||
syn keyword cAnsiName PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64
|
||||
syn keyword cAnsiName PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX
|
||||
syn keyword cAnsiName PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR
|
||||
syn keyword cAnsiName PRIdFAST64 PRIiMAX PRIoPTR PRIx8
|
||||
syn keyword cAnsiName PRIdMAX PRIiPTR PRIu8 PRIx16
|
||||
syn keyword cAnsiName PRIdPTR PRIo8 PRIu16 PRIx32
|
||||
syn keyword cAnsiName PRIi8 PRIo16 PRIu32 PRIx64
|
||||
|
||||
syn keyword cAnsiName PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32
|
||||
syn keyword cAnsiName PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64
|
||||
syn keyword cAnsiName PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8
|
||||
syn keyword cAnsiName PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16
|
||||
syn keyword cAnsiName PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32
|
||||
syn keyword cAnsiName PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64
|
||||
syn keyword cAnsiName PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX
|
||||
syn keyword cAnsiName PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR
|
||||
syn keyword cAnsiName PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8
|
||||
syn keyword cAnsiName PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16
|
||||
syn keyword cAnsiName PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32
|
||||
syn keyword cAnsiName PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64
|
||||
syn keyword cAnsiName PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8
|
||||
syn keyword cAnsiName PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16
|
||||
syn keyword cAnsiName PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32
|
||||
syn keyword cAnsiName PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64
|
||||
syn keyword cAnsiName PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8
|
||||
syn keyword cAnsiName PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16
|
||||
syn keyword cAnsiName PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32
|
||||
syn keyword cAnsiName PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64
|
||||
syn keyword cAnsiName PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX
|
||||
syn keyword cAnsiName PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR
|
||||
syn keyword cAnsiName PRIXMAX SCNiFAST8 SCNuLEAST8
|
||||
syn keyword cAnsiName PRIXPTR SCNiFAST16 SCNuLEAST16
|
||||
|
||||
syn keyword cAnsiName errno environ
|
||||
|
||||
syn keyword cAnsiName STDC CX_LIMITED_RANGE
|
||||
syn keyword cAnsiName STDC FENV_ACCESS
|
||||
syn keyword cAnsiName STDC FP_CONTRACT
|
||||
|
||||
syn keyword cAnsiName AF_INET SOCK_STREAM INADDR_ANY AF_INET
|
||||
syn keyword cAnsiName SOL_SOCKET SO_REUSEPORT SO_REUSEADDR
|
||||
syn keyword cAnsiName SO_RCVTIMEO IPPROTO_TCP TCP_NODELAY
|
||||
syn keyword cAnsiName SOCK_DGRAM POLLIN
|
||||
|
||||
syn keyword cAnsiName and bitor not_eq xor
|
||||
syn keyword cAnsiName and_eq compl or xor_eq
|
||||
syn keyword cAnsiName bitand not or_eq
|
||||
|
||||
hi def link cAnsiFunction cFunction
|
||||
hi def link cAnsiName cIdentifier
|
||||
|
||||
" Operators
|
||||
syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
|
||||
syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
|
||||
syn match cOperator "[.!~*&%<>^|=,+-]"
|
||||
syn match cOperator "/[^/*=]"me=e-1
|
||||
syn match cOperator "/$"
|
||||
syn match cOperator "&&\|||"
|
||||
syn match cOperator "[][]"
|
||||
|
||||
" Preprocs
|
||||
syn keyword cDefined defined contained containedin=cDefine
|
||||
hi def link cDefined cDefine
|
||||
|
||||
" Functions
|
||||
syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
|
||||
syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator
|
||||
|
||||
hi def link cUserFunction cFunction
|
||||
hi def link cUserFunctionPointer cFunction
|
||||
|
||||
" Delimiters
|
||||
syn match cDelimiter "[();\\]"
|
||||
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
||||
syn match cBraces display "[{}]"
|
||||
|
||||
|
||||
" Booleans
|
||||
syn keyword cBoolean true false TRUE FALSE
|
||||
|
||||
|
||||
" Links
|
||||
hi def link cFunction Function
|
||||
hi def link cIdentifier Identifier
|
||||
hi def link cDelimiter Delimiter
|
||||
" foldmethod=syntax fix, courtesy of Ivan Freitas
|
||||
hi def link cBraces Delimiter
|
||||
hi def link cBoolean Boolean
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,562 +0,0 @@
|
|||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Current Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" Previous Maintainer: Neil Schemenauer <nas at python dot ca>
|
||||
" URL: https://github.com/hdima/python-syntax
|
||||
" Last Change: 2015-11-01
|
||||
" Filenames: *.py
|
||||
" Version: 3.6.0
|
||||
"
|
||||
" Based on python.vim (from Vim 6.1 distribution)
|
||||
" by Neil Schemenauer <nas at python dot ca>
|
||||
"
|
||||
" Please use the following channels for reporting bugs, offering suggestions or
|
||||
" feedback:
|
||||
|
||||
" - python.vim issue tracker: https://github.com/hdima/python-syntax/issues
|
||||
" - Email: Dmitry Vasiliev (dima at hlabs.org)
|
||||
" - Send a message or follow me for updates on Twitter: `@hdima
|
||||
" <https://twitter.com/hdima>`__
|
||||
"
|
||||
" Contributors
|
||||
" ============
|
||||
"
|
||||
" List of the contributors in alphabetical order:
|
||||
"
|
||||
" Andrea Riciputi
|
||||
" Anton Butanaev
|
||||
" Antony Lee
|
||||
" Caleb Adamantine
|
||||
" David Briscoe
|
||||
" Elizabeth Myers
|
||||
" Ihor Gorobets
|
||||
" Jeroen Ruigrok van der Werven
|
||||
" John Eikenberry
|
||||
" Joongi Kim
|
||||
" Marc Weber
|
||||
" Pedro Algarvio
|
||||
" Victor Salgado
|
||||
" Will Gray
|
||||
" Yuri Habrusiev
|
||||
"
|
||||
" Options
|
||||
" =======
|
||||
"
|
||||
" :let OPTION_NAME = 1 Enable option
|
||||
" :let OPTION_NAME = 0 Disable option
|
||||
"
|
||||
"
|
||||
" Option to select Python version
|
||||
" -------------------------------
|
||||
"
|
||||
" python_version_2 Enable highlighting for Python 2
|
||||
" (Python 3 highlighting is enabled
|
||||
" by default). Can also be set as
|
||||
" a buffer (b:python_version_2)
|
||||
" variable.
|
||||
"
|
||||
" You can also use the following local to buffer commands to switch
|
||||
" between two highlighting modes:
|
||||
"
|
||||
" :Python2Syntax Switch to Python 2 highlighting
|
||||
" mode
|
||||
" :Python3Syntax Switch to Python 3 highlighting
|
||||
" mode
|
||||
"
|
||||
" Option names used by the script
|
||||
" -------------------------------
|
||||
"
|
||||
" python_highlight_builtins Highlight builtin functions and
|
||||
" objects
|
||||
" python_highlight_builtin_objs Highlight builtin objects only
|
||||
" python_highlight_builtin_funcs Highlight builtin functions only
|
||||
" python_highlight_exceptions Highlight standard exceptions
|
||||
" python_highlight_string_formatting Highlight % string formatting
|
||||
" python_highlight_string_format Highlight str.format syntax
|
||||
" python_highlight_string_templates Highlight string.Template syntax
|
||||
" python_highlight_indent_errors Highlight indentation errors
|
||||
" python_highlight_space_errors Highlight trailing spaces
|
||||
" python_highlight_doctests Highlight doc-tests
|
||||
" python_print_as_function Highlight 'print' statement as
|
||||
" function for Python 2
|
||||
" python_highlight_file_headers_as_comments
|
||||
" Highlight shebang and coding
|
||||
" headers as comments
|
||||
"
|
||||
" python_highlight_all Enable all the options above
|
||||
" NOTE: This option don't override
|
||||
" any previously set options
|
||||
"
|
||||
" python_slow_sync Can be set to 0 for slow machines
|
||||
"
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For versions greater than 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
"
|
||||
" Commands
|
||||
"
|
||||
command! -buffer Python3Syntax let b:python_version_2 = 0 | let &syntax=&syntax
|
||||
|
||||
" Enable option if it's not defined
|
||||
function! s:EnableByDefault(name)
|
||||
if !exists(a:name)
|
||||
let {a:name} = 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Check if option is enabled
|
||||
function! s:Enabled(name)
|
||||
return exists(a:name) && {a:name}
|
||||
endfunction
|
||||
|
||||
" Is it Python 2 syntax?
|
||||
function! s:Python2Syntax()
|
||||
if exists("b:python_version_2")
|
||||
return b:python_version_2
|
||||
endif
|
||||
return s:Enabled("g:python_version_2")
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Default options
|
||||
"
|
||||
|
||||
call s:EnableByDefault("g:python_slow_sync")
|
||||
|
||||
if s:Enabled("g:python_highlight_all")
|
||||
call s:EnableByDefault("g:python_highlight_builtins")
|
||||
if s:Enabled("g:python_highlight_builtins")
|
||||
call s:EnableByDefault("g:python_highlight_builtin_objs")
|
||||
call s:EnableByDefault("g:python_highlight_builtin_funcs")
|
||||
endif
|
||||
call s:EnableByDefault("g:python_highlight_exceptions")
|
||||
call s:EnableByDefault("g:python_highlight_string_formatting")
|
||||
call s:EnableByDefault("g:python_highlight_string_format")
|
||||
call s:EnableByDefault("g:python_highlight_string_templates")
|
||||
call s:EnableByDefault("g:python_highlight_indent_errors")
|
||||
call s:EnableByDefault("g:python_highlight_space_errors")
|
||||
call s:EnableByDefault("g:python_highlight_doctests")
|
||||
call s:EnableByDefault("g:python_print_as_function")
|
||||
endif
|
||||
|
||||
"
|
||||
" Keywords
|
||||
"
|
||||
|
||||
syn keyword pythonStatement break continue del
|
||||
syn keyword pythonStatement exec return
|
||||
syn keyword pythonStatement pass raise
|
||||
syn keyword pythonStatement global assert
|
||||
syn keyword pythonStatement lambda
|
||||
syn keyword pythonStatement with
|
||||
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
||||
syn keyword pythonRepeat for while
|
||||
syn keyword pythonConditional if elif else
|
||||
" The standard pyrex.vim unconditionally removes the pythonInclude group, so
|
||||
" we provide a dummy group here to avoid crashing pyrex.vim.
|
||||
syn keyword pythonInclude import
|
||||
syn keyword pythonImport import
|
||||
syn keyword pythonException try except finally
|
||||
syn keyword pythonOperator and in is not or
|
||||
|
||||
syn match pythonStatement "\<yield\>" display
|
||||
syn match pythonImport "\<from\>" display
|
||||
|
||||
if s:Python2Syntax()
|
||||
if !s:Enabled("g:python_print_as_function")
|
||||
syn keyword pythonStatement print
|
||||
endif
|
||||
syn keyword pythonImport as
|
||||
syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained
|
||||
else
|
||||
syn keyword pythonStatement as nonlocal None
|
||||
syn match pythonStatement "\<yield\s\+from\>" display
|
||||
syn keyword pythonBoolean True False
|
||||
syn match pythonFunction "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
|
||||
syn keyword pythonStatement await
|
||||
syn match pythonStatement "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
|
||||
syn match pythonStatement "\<async\s\+with\>" display
|
||||
syn match pythonStatement "\<async\s\+for\>" display
|
||||
endif
|
||||
|
||||
"
|
||||
" Decorators (new in Python 2.4)
|
||||
"
|
||||
|
||||
syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite
|
||||
if s:Python2Syntax()
|
||||
syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\%(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained
|
||||
else
|
||||
syn match pythonDottedName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\)*" display contained
|
||||
endif
|
||||
syn match pythonDot "\." display containedin=pythonDottedName
|
||||
|
||||
"
|
||||
" Comments
|
||||
"
|
||||
|
||||
syn match pythonComment "#.*$" display contains=pythonTodo,@Spell
|
||||
if !s:Enabled("g:python_highlight_file_headers_as_comments")
|
||||
syn match pythonRun "\%^#!.*$"
|
||||
syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
||||
endif
|
||||
syn keyword pythonTodo TODO FIXME XXX contained
|
||||
|
||||
"
|
||||
" Errors
|
||||
"
|
||||
|
||||
syn match pythonError "\<\d\+\D\+\>" display
|
||||
syn match pythonError "[$?]" display
|
||||
syn match pythonError "[&|]\{2,}" display
|
||||
syn match pythonError "[=]\{3,}" display
|
||||
|
||||
" Mixing spaces and tabs also may be used for pretty formatting multiline
|
||||
" statements
|
||||
if s:Enabled("g:python_highlight_indent_errors")
|
||||
syn match pythonIndentError "^\s*\%( \t\|\t \)\s*\S"me=e-1 display
|
||||
endif
|
||||
|
||||
" Trailing space errors
|
||||
if s:Enabled("g:python_highlight_space_errors")
|
||||
syn match pythonSpaceError "\s\+$" display
|
||||
endif
|
||||
|
||||
"
|
||||
" Strings
|
||||
"
|
||||
|
||||
if s:Python2Syntax()
|
||||
" Python 2 strings
|
||||
syn region pythonString start=+[bB]\='+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonString start=+[bB]\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonString start=+[bB]\="""+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonString start=+[bB]\='''+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
else
|
||||
" Python 3 byte strings
|
||||
syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
|
||||
syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
|
||||
syn region pythonBytes start=+[bB]"""+ end=+"""+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonBytes start=+[bB]'''+ end=+'''+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonBytesError ".\+" display contained
|
||||
syn match pythonBytesContent "[\u0000-\u00ff]\+" display contained contains=pythonBytesEscape,pythonBytesEscapeError
|
||||
endif
|
||||
|
||||
syn match pythonBytesEscape +\\[abfnrtv'"\\]+ display contained
|
||||
syn match pythonBytesEscape "\\\o\o\=\o\=" display contained
|
||||
syn match pythonBytesEscapeError "\\\o\{,2}[89]" display contained
|
||||
syn match pythonBytesEscape "\\x\x\{2}" display contained
|
||||
syn match pythonBytesEscapeError "\\x\x\=\X" display contained
|
||||
syn match pythonBytesEscape "\\$"
|
||||
|
||||
syn match pythonUniEscape "\\u\x\{4}" display contained
|
||||
syn match pythonUniEscapeError "\\u\x\{,3}\X" display contained
|
||||
syn match pythonUniEscape "\\U\x\{8}" display contained
|
||||
syn match pythonUniEscapeError "\\U\x\{,7}\X" display contained
|
||||
syn match pythonUniEscape "\\N{[A-Z ]\+}" display contained
|
||||
syn match pythonUniEscapeError "\\N{[^A-Z ]\+}" display contained
|
||||
|
||||
if s:Python2Syntax()
|
||||
" Python 2 Unicode strings
|
||||
syn region pythonUniString start=+[uU]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonUniString start=+[uU]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonUniString start=+[uU]"""+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonUniString start=+[uU]'''+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
else
|
||||
" Python 3 strings
|
||||
syn region pythonString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,@Spell
|
||||
syn region pythonString start=+"""+ end=+"""+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonString start=+'''+ end=+'''+ keepend contains=pythonBytesEscape,pythonBytesEscapeError,pythonUniEscape,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
endif
|
||||
|
||||
if s:Python2Syntax()
|
||||
" Python 2 Unicode raw strings
|
||||
syn region pythonUniRawString start=+[uU][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]"""+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonUniRawString start=+[uU][rR]'''+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn match pythonUniRawEscape "\([^\\]\(\\\\\)*\)\@<=\\u\x\{4}" display contained
|
||||
syn match pythonUniRawEscapeError "\([^\\]\(\\\\\)*\)\@<=\\u\x\{,3}\X" display contained
|
||||
endif
|
||||
|
||||
" Python 2/3 raw strings
|
||||
if s:Python2Syntax()
|
||||
syn region pythonRawString start=+[bB]\=[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[bB]\=[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[bB]\=[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonRawString start=+[bB]\=[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
|
||||
else
|
||||
syn region pythonRawString start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawString start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonRawString start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
|
||||
|
||||
syn region pythonRawBytes start=+[bB][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawBytes start=+[bB][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
|
||||
syn region pythonRawBytes start=+[bB][rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
|
||||
syn region pythonRawBytes start=+[bB][rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
|
||||
endif
|
||||
|
||||
syn match pythonRawEscape +\\['"]+ display transparent contained
|
||||
|
||||
if s:Enabled("g:python_highlight_string_formatting")
|
||||
" % operator string formatting
|
||||
if s:Python2Syntax()
|
||||
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
else
|
||||
syn match pythonStrFormatting "%\%(([^)]\+)\)\=[-#0 +]*\d*\%(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
|
||||
syn match pythonStrFormatting "%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonRawString
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:Enabled("g:python_highlight_string_format")
|
||||
" str.format syntax
|
||||
if s:Python2Syntax()
|
||||
syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
syn match pythonStrFormat "{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
else
|
||||
syn match pythonStrFormat "{{\|}}" contained containedin=pythonString,pythonRawString
|
||||
syn match pythonStrFormat "{\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)\=\%(\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\[\%(\d\+\|[^!:\}]\+\)\]\)*\%(![rsa]\)\=\%(:\%({\%(\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*\|\d\+\)}\|\%([^}]\=[<>=^]\)\=[ +-]\=#\=0\=\d*,\=\%(\.\d\+\)\=[bcdeEfFgGnosxX%]\=\)\=\)\=}" contained containedin=pythonString,pythonRawString
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:Enabled("g:python_highlight_string_templates")
|
||||
" string.Template format
|
||||
if s:Python2Syntax()
|
||||
syn match pythonStrTemplate "\$\$" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
syn match pythonStrTemplate "\${[a-zA-Z_][a-zA-Z0-9_]*}" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
syn match pythonStrTemplate "\$[a-zA-Z_][a-zA-Z0-9_]*" contained containedin=pythonString,pythonUniString,pythonUniRawString,pythonRawString
|
||||
else
|
||||
syn match pythonStrTemplate "\$\$" contained containedin=pythonString,pythonRawString
|
||||
syn match pythonStrTemplate "\${[a-zA-Z_][a-zA-Z0-9_]*}" contained containedin=pythonString,pythonRawString
|
||||
syn match pythonStrTemplate "\$[a-zA-Z_][a-zA-Z0-9_]*" contained containedin=pythonString,pythonRawString
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:Enabled("g:python_highlight_doctests")
|
||||
" DocTests
|
||||
syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained
|
||||
syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained
|
||||
endif
|
||||
|
||||
"
|
||||
" Numbers (ints, longs, floats, complex)
|
||||
"
|
||||
|
||||
if s:Python2Syntax()
|
||||
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\+\x*[lL]\=\>" display
|
||||
syn match pythonOctError "\<0[oO]\=\o*\D\+\d*[lL]\=\>" display
|
||||
syn match pythonBinError "\<0[bB][01]*\D\+\d*[lL]\=\>" display
|
||||
|
||||
syn match pythonHexNumber "\<0[xX]\x\+[lL]\=\>" display
|
||||
syn match pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
|
||||
syn match pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
|
||||
|
||||
syn match pythonNumberError "\<\d\+\D[lL]\=\>" display
|
||||
syn match pythonNumber "\<\d[lL]\=\>" display
|
||||
syn match pythonNumber "\<[0-9]\d\+[lL]\=\>" display
|
||||
syn match pythonNumber "\<\d\+[lLjJ]\>" display
|
||||
|
||||
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
|
||||
syn match pythonBinError "\<0[bB][01]*[2-9]\d*[lL]\=\>" display
|
||||
else
|
||||
syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*\>" display
|
||||
syn match pythonOctError "\<0[oO]\=\o*\D\+\d*\>" display
|
||||
syn match pythonBinError "\<0[bB][01]*\D\+\d*\>" display
|
||||
|
||||
syn match pythonHexNumber "\<0[xX]\x\+\>" display
|
||||
syn match pythonOctNumber "\<0[oO]\o\+\>" display
|
||||
syn match pythonBinNumber "\<0[bB][01]\+\>" display
|
||||
|
||||
syn match pythonNumberError "\<\d\+\D\>" display
|
||||
syn match pythonNumberError "\<0\d\+\>" display
|
||||
syn match pythonNumber "\<\d\>" display
|
||||
syn match pythonNumber "\<[1-9]\d\+\>" display
|
||||
syn match pythonNumber "\<\d\+[jJ]\>" display
|
||||
|
||||
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*\>" display
|
||||
syn match pythonBinError "\<0[bB][01]*[2-9]\d*\>" display
|
||||
endif
|
||||
|
||||
syn match pythonFloat "\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" display
|
||||
syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
|
||||
syn match pythonFloat "\<\d\+\.\d*\%([eE][+-]\=\d\+\)\=[jJ]\=" display
|
||||
|
||||
"
|
||||
" Builtin objects and types
|
||||
"
|
||||
|
||||
if s:Enabled("g:python_highlight_builtin_objs")
|
||||
if s:Python2Syntax()
|
||||
syn keyword pythonBuiltinObj None
|
||||
syn keyword pythonBoolean True False
|
||||
endif
|
||||
syn keyword pythonBuiltinObj Ellipsis NotImplemented
|
||||
syn keyword pythonBuiltinObj __debug__ __doc__ __file__ __name__ __package__
|
||||
endif
|
||||
|
||||
"
|
||||
" Builtin functions
|
||||
"
|
||||
|
||||
if s:Enabled("g:python_highlight_builtin_funcs")
|
||||
if s:Python2Syntax()
|
||||
syn keyword pythonBuiltinFunc apply basestring buffer callable coerce
|
||||
syn keyword pythonBuiltinFunc execfile file help intern long raw_input
|
||||
syn keyword pythonBuiltinFunc reduce reload unichr unicode xrange
|
||||
if s:Enabled("g:python_print_as_function")
|
||||
syn keyword pythonBuiltinFunc print
|
||||
endif
|
||||
else
|
||||
syn keyword pythonBuiltinFunc ascii exec memoryview print
|
||||
endif
|
||||
syn keyword pythonBuiltinFunc __import__ abs all any
|
||||
syn keyword pythonBuiltinFunc bin bool bytearray bytes
|
||||
syn keyword pythonBuiltinFunc chr classmethod cmp compile complex
|
||||
syn keyword pythonBuiltinFunc delattr dict dir divmod enumerate eval
|
||||
syn keyword pythonBuiltinFunc filter float format frozenset getattr
|
||||
syn keyword pythonBuiltinFunc globals hasattr hash hex id
|
||||
syn keyword pythonBuiltinFunc input int isinstance
|
||||
syn keyword pythonBuiltinFunc issubclass iter len list locals map max
|
||||
syn keyword pythonBuiltinFunc min next object oct open ord
|
||||
syn keyword pythonBuiltinFunc pow property range
|
||||
syn keyword pythonBuiltinFunc repr reversed round set setattr
|
||||
syn keyword pythonBuiltinFunc slice sorted staticmethod str sum super tuple
|
||||
syn keyword pythonBuiltinFunc type vars zip
|
||||
endif
|
||||
|
||||
"
|
||||
" Builtin exceptions and warnings
|
||||
"
|
||||
|
||||
if s:Enabled("g:python_highlight_exceptions")
|
||||
if s:Python2Syntax()
|
||||
syn keyword pythonExClass StandardError
|
||||
else
|
||||
syn keyword pythonExClass BlockingIOError ChildProcessError
|
||||
syn keyword pythonExClass ConnectionError BrokenPipeError
|
||||
syn keyword pythonExClass ConnectionAbortedError ConnectionRefusedError
|
||||
syn keyword pythonExClass ConnectionResetError FileExistsError
|
||||
syn keyword pythonExClass FileNotFoundError InterruptedError
|
||||
syn keyword pythonExClass IsADirectoryError NotADirectoryError
|
||||
syn keyword pythonExClass PermissionError ProcessLookupError TimeoutError
|
||||
|
||||
syn keyword pythonExClass ResourceWarning
|
||||
endif
|
||||
syn keyword pythonExClass BaseException
|
||||
syn keyword pythonExClass Exception ArithmeticError
|
||||
syn keyword pythonExClass LookupError EnvironmentError
|
||||
|
||||
syn keyword pythonExClass AssertionError AttributeError BufferError EOFError
|
||||
syn keyword pythonExClass FloatingPointError GeneratorExit IOError
|
||||
syn keyword pythonExClass ImportError IndexError KeyError
|
||||
syn keyword pythonExClass KeyboardInterrupt MemoryError NameError
|
||||
syn keyword pythonExClass NotImplementedError OSError OverflowError
|
||||
syn keyword pythonExClass ReferenceError RuntimeError StopIteration
|
||||
syn keyword pythonExClass SyntaxError IndentationError TabError
|
||||
syn keyword pythonExClass SystemError SystemExit TypeError
|
||||
syn keyword pythonExClass UnboundLocalError UnicodeError
|
||||
syn keyword pythonExClass UnicodeEncodeError UnicodeDecodeError
|
||||
syn keyword pythonExClass UnicodeTranslateError ValueError VMSError
|
||||
syn keyword pythonExClass WindowsError ZeroDivisionError
|
||||
|
||||
syn keyword pythonExClass Warning UserWarning BytesWarning DeprecationWarning
|
||||
syn keyword pythonExClass PendingDepricationWarning SyntaxWarning
|
||||
syn keyword pythonExClass RuntimeWarning FutureWarning
|
||||
syn keyword pythonExClass ImportWarning UnicodeWarning
|
||||
endif
|
||||
|
||||
if s:Enabled("g:python_slow_sync")
|
||||
syn sync minlines=2000
|
||||
else
|
||||
" This is fast but code inside triple quoted strings screws it up. It
|
||||
" is impossible to fix because the only way to know if you are inside a
|
||||
" triple quoted string is to start from the beginning of the file.
|
||||
syn sync match pythonSync grouphere NONE "):$"
|
||||
syn sync maxlines=200
|
||||
endif
|
||||
|
||||
if version >= 508 || !exists("did_python_syn_inits")
|
||||
if version <= 508
|
||||
let did_python_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink pythonStatement Statement
|
||||
HiLink pythonImport Include
|
||||
HiLink pythonFunction Function
|
||||
HiLink pythonConditional Conditional
|
||||
HiLink pythonRepeat Repeat
|
||||
HiLink pythonException Exception
|
||||
HiLink pythonOperator Operator
|
||||
|
||||
HiLink pythonDecorator Define
|
||||
HiLink pythonDottedName Function
|
||||
HiLink pythonDot Normal
|
||||
|
||||
HiLink pythonComment Comment
|
||||
if !s:Enabled("g:python_highlight_file_headers_as_comments")
|
||||
HiLink pythonCoding Special
|
||||
HiLink pythonRun Special
|
||||
endif
|
||||
HiLink pythonTodo Todo
|
||||
|
||||
HiLink pythonError Error
|
||||
HiLink pythonIndentError Error
|
||||
HiLink pythonSpaceError Error
|
||||
|
||||
HiLink pythonString String
|
||||
HiLink pythonRawString String
|
||||
|
||||
HiLink pythonUniEscape Special
|
||||
HiLink pythonUniEscapeError Error
|
||||
|
||||
if s:Python2Syntax()
|
||||
HiLink pythonUniString String
|
||||
HiLink pythonUniRawString String
|
||||
HiLink pythonUniRawEscape Special
|
||||
HiLink pythonUniRawEscapeError Error
|
||||
else
|
||||
HiLink pythonBytes String
|
||||
HiLink pythonRawBytes String
|
||||
HiLink pythonBytesContent String
|
||||
HiLink pythonBytesError Error
|
||||
HiLink pythonBytesEscape Special
|
||||
HiLink pythonBytesEscapeError Error
|
||||
endif
|
||||
|
||||
HiLink pythonStrFormatting Special
|
||||
HiLink pythonStrFormat Special
|
||||
HiLink pythonStrTemplate Special
|
||||
|
||||
HiLink pythonDocTest Special
|
||||
HiLink pythonDocTest2 Special
|
||||
|
||||
HiLink pythonNumber Number
|
||||
HiLink pythonHexNumber Number
|
||||
HiLink pythonOctNumber Number
|
||||
HiLink pythonBinNumber Number
|
||||
HiLink pythonFloat Float
|
||||
HiLink pythonNumberError Error
|
||||
HiLink pythonOctError Error
|
||||
HiLink pythonHexError Error
|
||||
HiLink pythonBinError Error
|
||||
|
||||
HiLink pythonBoolean Boolean
|
||||
|
||||
HiLink pythonBuiltinObj Structure
|
||||
HiLink pythonBuiltinFunc Function
|
||||
|
||||
HiLink pythonExClass Structure
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "python"
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/autoload
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
" -----------------------------------------------------------------------------
|
||||
" File: gruvbox.vim
|
||||
" Description: Retro groove color scheme for Airline
|
||||
" Author: morhetz <morhetz@gmail.com>
|
||||
" Source: https://github.com/morhetz/gruvbox
|
||||
" Last Modified: 12 Aug 2017
|
||||
" -----------------------------------------------------------------------------
|
||||
|
||||
let g:airline#themes#gruvbox#palette = {}
|
||||
|
||||
function! airline#themes#gruvbox#refresh()
|
||||
|
||||
let M0 = airline#themes#get_highlight('Identifier')
|
||||
let accents_group = airline#themes#get_highlight('Special')
|
||||
let modified_group = [M0[0], '', M0[2], '', '']
|
||||
let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
||||
let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg'])
|
||||
|
||||
let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg'])
|
||||
let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg'])
|
||||
let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg'])
|
||||
let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||
let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group }
|
||||
let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group
|
||||
let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group
|
||||
let g:airline#themes#gruvbox#palette.normal.airline_error = error_group
|
||||
let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group
|
||||
|
||||
let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg'])
|
||||
let s:I2 = s:N2
|
||||
let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg'])
|
||||
let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
||||
let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified
|
||||
let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||
let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||
|
||||
let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg'])
|
||||
let s:R2 = s:I2
|
||||
let s:R3 = s:I3
|
||||
let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
||||
let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified
|
||||
let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||
let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||
|
||||
let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
||||
let s:V2 = s:N2
|
||||
let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg'])
|
||||
let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
||||
let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] }
|
||||
let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||
let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||
let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||
|
||||
let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg'])
|
||||
let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
|
||||
let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group }
|
||||
|
||||
let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group }
|
||||
|
||||
let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg'])
|
||||
let g:airline#themes#gruvbox#palette.tabline = {
|
||||
\ 'airline_tab': s:N2,
|
||||
\ 'airline_tabsel': s:N1,
|
||||
\ 'airline_tabtype': s:V1,
|
||||
\ 'airline_tabfill': s:TF,
|
||||
\ 'airline_tabhid': s:IA,
|
||||
\ 'airline_tabmod': s:I1
|
||||
\ }
|
||||
|
||||
endfunction
|
||||
|
||||
call airline#themes#gruvbox#refresh()
|
||||
|
||||
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
let g:airline#themes#quantum#palette = {}
|
||||
|
||||
function! airline#themes#quantum#refresh()
|
||||
let g:airline#themes#quantum#palette.accents = {
|
||||
\ 'red': airline#themes#get_highlight('Identifier'),
|
||||
\ }
|
||||
|
||||
let s:N1 = airline#themes#get_highlight2(['CursorLine', 'bg'], ['Directory', 'fg'], 'bold')
|
||||
let s:N2 = airline#themes#get_highlight('Pmenu')
|
||||
let s:N3 = airline#themes#get_highlight('TabLine')
|
||||
let g:airline#themes#quantum#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||
|
||||
let group = airline#themes#get_highlight('Type')
|
||||
let g:airline#themes#quantum#palette.normal_modified = {
|
||||
\ 'airline_c': [ group[0], '', group[2], '', '' ]
|
||||
\ }
|
||||
|
||||
let s:I1 = airline#themes#get_highlight2(['CursorLine', 'bg'], ['MoreMsg', 'fg'], 'bold')
|
||||
let g:airline#themes#quantum#palette.insert = airline#themes#generate_color_map(s:I1, s:N2, s:N3)
|
||||
let g:airline#themes#quantum#palette.insert_modified = g:airline#themes#quantum#palette.normal_modified
|
||||
|
||||
let s:R1 = airline#themes#get_highlight2(['CursorLine', 'bg'], ['Error', 'fg'], 'bold')
|
||||
let g:airline#themes#quantum#palette.replace = airline#themes#generate_color_map(s:R1, s:N2, s:N3)
|
||||
let g:airline#themes#quantum#palette.replace_modified = g:airline#themes#quantum#palette.normal_modified
|
||||
|
||||
let s:V1 = airline#themes#get_highlight2(['CursorLine', 'bg'], ['Statement', 'fg'], 'bold')
|
||||
let g:airline#themes#quantum#palette.visual = airline#themes#generate_color_map(s:V1, s:N2, s:N3)
|
||||
let g:airline#themes#quantum#palette.visual_modified = g:airline#themes#quantum#palette.normal_modified
|
||||
|
||||
let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg'])
|
||||
let g:airline#themes#quantum#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
|
||||
let g:airline#themes#quantum#palette.inactive_modified = g:airline#themes#quantum#palette.normal_modified
|
||||
|
||||
if get(g:, 'loaded_ctrlp', 0)
|
||||
let g:airline#themes#quantum#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
|
||||
\ airline#themes#get_highlight('CursorLine'),
|
||||
\ airline#themes#get_highlight2(['Operator', 'fg'], ['Normal', 'bg']),
|
||||
\ airline#themes#get_highlight2(['Normal', 'bg'], ['Operator', 'fg'], 'bold'))
|
||||
endif
|
||||
endfun
|
||||
|
||||
call airline#themes#quantum#refresh()
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/coc-settings.json
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/colors
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,670 +0,0 @@
|
|||
" _ _ _ __
|
||||
" | |__ __ _ __| | __ _____ | |/ _|
|
||||
" | '_ \ / _` |/ _` | \ \ /\ / / _ \| | |_
|
||||
" | |_) | (_| | (_| | \ V V / (_) | | _|
|
||||
" |_.__/ \__,_|\__,_| \_/\_/ \___/|_|_|
|
||||
"
|
||||
" I am the Bad Wolf. I create myself.
|
||||
" I take the words. I scatter them in time and space.
|
||||
" A message to lead myself here.
|
||||
"
|
||||
" A Vim colorscheme pieced together by Steve Losh.
|
||||
" Available at http://stevelosh.com/projects/badwolf/
|
||||
"
|
||||
" Why? {{{
|
||||
"
|
||||
" After using Molokai for quite a long time, I started longing for
|
||||
" a replacement.
|
||||
"
|
||||
" I love Molokai's high contrast and gooey, saturated tones, but it can be
|
||||
" a little inconsistent at times.
|
||||
"
|
||||
" Also it's winter here in Rochester, so I wanted a color scheme that's a bit
|
||||
" warmer. A little less blue and a bit more red.
|
||||
"
|
||||
" And so Bad Wolf was born. I'm no designer, but designers have been scattering
|
||||
" beautiful colors through time and space long before I came along. I took
|
||||
" advantage of that and reused some of my favorites to lead me to this scheme.
|
||||
"
|
||||
" }}}
|
||||
|
||||
" Supporting code -------------------------------------------------------------
|
||||
" Preamble {{{
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
color=#1f1f1f
|
||||
set background=dark
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = "badwolf"
|
||||
|
||||
if !exists("g:badwolf_html_link_underline") " {{{
|
||||
let g:badwolf_html_link_underline = 1
|
||||
endif " }}}
|
||||
|
||||
if !exists("g:badwolf_css_props_highlight") " {{{
|
||||
let g:badwolf_css_props_highlight = 0
|
||||
endif " }}}
|
||||
|
||||
" }}}
|
||||
" Palette {{{
|
||||
|
||||
let s:bwc = {}
|
||||
|
||||
" The most basic of all our colors is a slightly tweaked version of the Molokai
|
||||
" Normal text.
|
||||
let s:bwc.plain = ['f8f6f2', 15]
|
||||
|
||||
" Pure and simple.
|
||||
let s:bwc.snow = ['ffffff', 15]
|
||||
let s:bwc.coal = ['000000', 16]
|
||||
|
||||
" All of the Gravel colors are based on a brown from Clouds Midnight.
|
||||
let s:bwc.brightgravel = ['d9cec3', 252]
|
||||
let s:bwc.lightgravel = ['998f84', 245]
|
||||
let s:bwc.gravel = ['857f78', 243]
|
||||
let s:bwc.mediumgravel = ['666462', 241]
|
||||
let s:bwc.deepgravel = ['45413b', 238]
|
||||
let s:bwc.deepergravel = ['35322d', 236]
|
||||
let s:bwc.darkgravel = ['242321', 235]
|
||||
let s:bwc.blackgravel = ['1c1b1a', 233]
|
||||
let s:bwc.blackestgravel = ['141413', 232]
|
||||
|
||||
" A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on
|
||||
" my desk.
|
||||
let s:bwc.dalespale = ['fade3e', 221]
|
||||
|
||||
" A beautiful tan from Tomorrow Night.
|
||||
let s:bwc.dirtyblonde = ['f4cf86', 222]
|
||||
|
||||
" Delicious, chewy red from Made of Code for the poppiest highlights.
|
||||
let s:bwc.taffy = ['ff2c4b', 196]
|
||||
|
||||
" Another chewy accent, but use sparingly!
|
||||
let s:bwc.saltwatertaffy = ['8cffba', 121]
|
||||
|
||||
" The star of the show comes straight from Made of Code.
|
||||
"
|
||||
" You should almost never use this. It should be used for things that denote
|
||||
" 'where the user is', which basically consists of:
|
||||
"
|
||||
" * The cursor
|
||||
" * A REPL prompt
|
||||
let s:bwc.tardis = ['0a9dff', 39]
|
||||
|
||||
" This one's from Mustang, not Florida!
|
||||
let s:bwc.orange = ['ffa724', 214]
|
||||
|
||||
" A limier green from Getafe.
|
||||
let s:bwc.lime = ['aeee00', 154]
|
||||
|
||||
" Rose's dress in The Idiot's Lantern.
|
||||
let s:bwc.dress = ['ff9eb8', 211]
|
||||
|
||||
" Another play on the brown from Clouds Midnight. I love that color.
|
||||
let s:bwc.toffee = ['b88853', 137]
|
||||
|
||||
" Also based on that Clouds Midnight brown.
|
||||
let s:bwc.coffee = ['c7915b', 173]
|
||||
let s:bwc.darkroast = ['88633f', 95]
|
||||
|
||||
" }}}
|
||||
" Highlighting Function {{{
|
||||
function! s:HL(group, fg, ...)
|
||||
" Arguments: group, guifg, guibg, gui, guisp
|
||||
|
||||
let histring = 'hi ' . a:group . ' '
|
||||
|
||||
if strlen(a:fg)
|
||||
if a:fg == 'fg'
|
||||
let histring .= 'guifg=fg ctermfg=fg '
|
||||
else
|
||||
let c = get(s:bwc, a:fg)
|
||||
let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:0 >= 1 && strlen(a:1)
|
||||
if a:1 == 'bg'
|
||||
let histring .= 'guibg=bg ctermbg=bg '
|
||||
else
|
||||
let c = get(s:bwc, a:1)
|
||||
let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:0 >= 2 && strlen(a:2)
|
||||
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
|
||||
endif
|
||||
|
||||
if a:0 >= 3 && strlen(a:3)
|
||||
let c = get(s:bwc, a:3)
|
||||
let histring .= 'guisp=#' . c[0] . ' '
|
||||
endif
|
||||
|
||||
" echom histring
|
||||
|
||||
execute histring
|
||||
endfunction
|
||||
" }}}
|
||||
" Configuration Options {{{
|
||||
|
||||
if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter
|
||||
let s:gutter = 'blackestgravel'
|
||||
else
|
||||
let s:gutter = 'blackgravel'
|
||||
endif
|
||||
|
||||
if exists('g:badwolf_tabline')
|
||||
if g:badwolf_tabline == 0
|
||||
let s:tabline = 'blackestgravel'
|
||||
elseif g:badwolf_tabline == 1
|
||||
let s:tabline = 'blackgravel'
|
||||
elseif g:badwolf_tabline == 2
|
||||
let s:tabline = 'darkgravel'
|
||||
elseif g:badwolf_tabline == 3
|
||||
let s:tabline = 'deepgravel'
|
||||
else
|
||||
let s:tabline = 'blackestgravel'
|
||||
endif
|
||||
else
|
||||
let s:tabline = 'blackgravel'
|
||||
endif
|
||||
|
||||
" }}}
|
||||
|
||||
" Actual colorscheme ----------------------------------------------------------
|
||||
" Vanilla Vim {{{
|
||||
|
||||
" General/UI {{{
|
||||
|
||||
call s:HL('Normal', 'plain', 'blackgravel')
|
||||
|
||||
call s:HL('Folded', 'mediumgravel', 'bg', 'none')
|
||||
|
||||
call s:HL('VertSplit', 'lightgravel', 'bg', 'none')
|
||||
|
||||
call s:HL('CursorLine', '', 'darkgravel', 'none')
|
||||
call s:HL('CursorColumn', '', 'darkgravel')
|
||||
call s:HL('ColorColumn', '', 'darkgravel')
|
||||
|
||||
call s:HL('TabLine', 'plain', s:tabline, 'none')
|
||||
call s:HL('TabLineFill', 'plain', s:tabline, 'none')
|
||||
call s:HL('TabLineSel', 'coal', 'tardis', 'none')
|
||||
|
||||
call s:HL('MatchParen', 'dalespale', 'darkgravel', 'bold')
|
||||
|
||||
call s:HL('NonText', 'deepgravel', 'bg')
|
||||
call s:HL('SpecialKey', 'deepgravel', 'bg')
|
||||
|
||||
call s:HL('Visual', '', 'deepgravel')
|
||||
call s:HL('VisualNOS', '', 'deepgravel')
|
||||
|
||||
call s:HL('Search', 'coal', 'dalespale', 'bold')
|
||||
call s:HL('IncSearch', 'coal', 'tardis', 'bold')
|
||||
|
||||
call s:HL('Underlined', 'fg', '', 'underline')
|
||||
|
||||
call s:HL('StatusLine', 'coal', 'tardis', 'bold')
|
||||
call s:HL('StatusLineNC', 'snow', 'deepgravel', 'bold')
|
||||
|
||||
call s:HL('Directory', 'dirtyblonde', '', 'bold')
|
||||
|
||||
call s:HL('Title', 'lime')
|
||||
|
||||
call s:HL('ErrorMsg', 'taffy', 'bg', 'bold')
|
||||
call s:HL('MoreMsg', 'dalespale', '', 'bold')
|
||||
call s:HL('ModeMsg', 'dirtyblonde', '', 'bold')
|
||||
call s:HL('Question', 'dirtyblonde', '', 'bold')
|
||||
call s:HL('WarningMsg', 'dress', '', 'bold')
|
||||
|
||||
" This is a ctags tag, not an HTML one. 'Something you can use c-] on'.
|
||||
call s:HL('Tag', '', '', 'bold')
|
||||
|
||||
" hi IndentGuides guibg=#373737
|
||||
" hi WildMenu guifg=#66D9EF guibg=#000000
|
||||
|
||||
" }}}
|
||||
" Gutter {{{
|
||||
|
||||
call s:HL('LineNr', 'mediumgravel', s:gutter)
|
||||
call s:HL('SignColumn', '', s:gutter)
|
||||
call s:HL('FoldColumn', 'mediumgravel', s:gutter)
|
||||
|
||||
" }}}
|
||||
" Cursor {{{
|
||||
|
||||
call s:HL('Cursor', 'coal', 'tardis', 'bold')
|
||||
call s:HL('vCursor', 'coal', 'tardis', 'bold')
|
||||
call s:HL('iCursor', 'coal', 'tardis', 'none')
|
||||
|
||||
" }}}
|
||||
" Syntax highlighting {{{
|
||||
|
||||
" Start with a simple base.
|
||||
call s:HL('Special', 'plain')
|
||||
|
||||
" Comments are slightly brighter than folds, to make 'headers' easier to see.
|
||||
call s:HL('Comment', 'gravel')
|
||||
call s:HL('Todo', 'snow', 'bg', 'bold')
|
||||
call s:HL('SpecialComment', 'snow', 'bg', 'bold')
|
||||
|
||||
" Strings are a nice, pale straw color. Nothing too fancy.
|
||||
call s:HL('String', 'dirtyblonde')
|
||||
|
||||
" Control flow stuff is taffy.
|
||||
call s:HL('Statement', 'taffy', '', 'bold')
|
||||
call s:HL('Keyword', 'taffy', '', 'bold')
|
||||
call s:HL('Conditional', 'taffy', '', 'bold')
|
||||
call s:HL('Operator', 'taffy', '', 'none')
|
||||
call s:HL('Label', 'taffy', '', 'none')
|
||||
call s:HL('Repeat', 'taffy', '', 'none')
|
||||
|
||||
" Functions and variable declarations are orange, because plain looks weird.
|
||||
call s:HL('Identifier', 'orange', '', 'none')
|
||||
call s:HL('Function', 'orange', '', 'none')
|
||||
|
||||
" Preprocessor stuff is lime, to make it pop.
|
||||
"
|
||||
" This includes imports in any given language, because they should usually be
|
||||
" grouped together at the beginning of a file. If they're in the middle of some
|
||||
" other code they should stand out, because something tricky is
|
||||
" probably going on.
|
||||
call s:HL('PreProc', 'lime', '', 'none')
|
||||
call s:HL('Macro', 'lime', '', 'none')
|
||||
call s:HL('Define', 'lime', '', 'none')
|
||||
call s:HL('PreCondit', 'lime', '', 'bold')
|
||||
|
||||
" Constants of all kinds are colored together.
|
||||
" I'm not really happy with the color yet...
|
||||
call s:HL('Constant', 'toffee', '', 'bold')
|
||||
call s:HL('Character', 'toffee', '', 'bold')
|
||||
call s:HL('Boolean', 'toffee', '', 'bold')
|
||||
|
||||
call s:HL('Number', 'toffee', '', 'bold')
|
||||
call s:HL('Float', 'toffee', '', 'bold')
|
||||
|
||||
" Not sure what 'special character in a constant' means, but let's make it pop.
|
||||
call s:HL('SpecialChar', 'dress', '', 'bold')
|
||||
|
||||
call s:HL('Type', 'dress', '', 'none')
|
||||
call s:HL('StorageClass', 'taffy', '', 'none')
|
||||
call s:HL('Structure', 'taffy', '', 'none')
|
||||
call s:HL('Typedef', 'taffy', '', 'bold')
|
||||
|
||||
" Make try/catch blocks stand out.
|
||||
call s:HL('Exception', 'lime', '', 'bold')
|
||||
|
||||
" Misc
|
||||
call s:HL('Error', 'snow', 'taffy', 'bold')
|
||||
call s:HL('Debug', 'snow', '', 'bold')
|
||||
call s:HL('Ignore', 'gravel', '', '')
|
||||
|
||||
" }}}
|
||||
" Completion Menu {{{
|
||||
|
||||
call s:HL('Pmenu', 'plain', 'deepergravel')
|
||||
call s:HL('PmenuSel', 'coal', 'tardis', 'bold')
|
||||
call s:HL('PmenuSbar', '', 'deepergravel')
|
||||
call s:HL('PmenuThumb', 'brightgravel')
|
||||
|
||||
" }}}
|
||||
" Diffs {{{
|
||||
|
||||
call s:HL('DiffDelete', 'coal', 'coal')
|
||||
call s:HL('DiffAdd', '', 'deepergravel')
|
||||
call s:HL('DiffChange', '', 'darkgravel')
|
||||
call s:HL('DiffText', 'snow', 'deepergravel', 'bold')
|
||||
|
||||
" }}}
|
||||
" Spelling {{{
|
||||
|
||||
if has("spell")
|
||||
call s:HL('SpellCap', 'dalespale', 'bg', 'undercurl,bold', 'dalespale')
|
||||
call s:HL('SpellBad', '', 'bg', 'undercurl', 'dalespale')
|
||||
call s:HL('SpellLocal', '', '', 'undercurl', 'dalespale')
|
||||
call s:HL('SpellRare', '', '', 'undercurl', 'dalespale')
|
||||
endif
|
||||
|
||||
" }}}
|
||||
|
||||
" }}}
|
||||
" Plugins {{{
|
||||
|
||||
" CtrlP {{{
|
||||
|
||||
" the message when no match is found
|
||||
call s:HL('CtrlPNoEntries', 'snow', 'taffy', 'bold')
|
||||
|
||||
" the matched pattern
|
||||
call s:HL('CtrlPMatch', 'orange', 'bg', 'none')
|
||||
|
||||
" the line prefix '>' in the match window
|
||||
call s:HL('CtrlPLinePre', 'deepgravel', 'bg', 'none')
|
||||
|
||||
" the prompt’s base
|
||||
call s:HL('CtrlPPrtBase', 'deepgravel', 'bg', 'none')
|
||||
|
||||
" the prompt’s text
|
||||
call s:HL('CtrlPPrtText', 'plain', 'bg', 'none')
|
||||
|
||||
" the prompt’s cursor when moving over the text
|
||||
call s:HL('CtrlPPrtCursor', 'coal', 'tardis', 'bold')
|
||||
|
||||
" 'prt' or 'win', also for 'regex'
|
||||
call s:HL('CtrlPMode1', 'coal', 'tardis', 'bold')
|
||||
|
||||
" 'file' or 'path', also for the local working dir
|
||||
call s:HL('CtrlPMode2', 'coal', 'tardis', 'bold')
|
||||
|
||||
" the scanning status
|
||||
call s:HL('CtrlPStats', 'coal', 'tardis', 'bold')
|
||||
|
||||
" TODO: CtrlP extensions.
|
||||
" CtrlPTabExtra : the part of each line that’s not matched against (Comment)
|
||||
" CtrlPqfLineCol : the line and column numbers in quickfix mode (|s:HL-Search|)
|
||||
" CtrlPUndoT : the elapsed time in undo mode (|s:HL-Directory|)
|
||||
" CtrlPUndoBr : the square brackets [] in undo mode (Comment)
|
||||
" CtrlPUndoNr : the undo number inside [] in undo mode (String)
|
||||
|
||||
" }}}
|
||||
" EasyMotion {{{
|
||||
|
||||
call s:HL('EasyMotionTarget', 'tardis', 'bg', 'bold')
|
||||
call s:HL('EasyMotionShade', 'deepgravel', 'bg')
|
||||
|
||||
" }}}
|
||||
" Interesting Words {{{
|
||||
|
||||
" These are only used if you're me or have copied the <leader>hNUM mappings
|
||||
" from my Vimrc.
|
||||
call s:HL('InterestingWord1', 'coal', 'orange')
|
||||
call s:HL('InterestingWord2', 'coal', 'lime')
|
||||
call s:HL('InterestingWord3', 'coal', 'saltwatertaffy')
|
||||
call s:HL('InterestingWord4', 'coal', 'toffee')
|
||||
call s:HL('InterestingWord5', 'coal', 'dress')
|
||||
call s:HL('InterestingWord6', 'coal', 'taffy')
|
||||
|
||||
|
||||
" }}}
|
||||
" Makegreen {{{
|
||||
|
||||
" hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=coal guibg=#9edf1c
|
||||
" hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048
|
||||
|
||||
" }}}
|
||||
" Rainbow Parentheses {{{
|
||||
|
||||
call s:HL('level16c', 'mediumgravel', '', 'bold')
|
||||
call s:HL('level15c', 'dalespale', '', '')
|
||||
call s:HL('level14c', 'dress', '', '')
|
||||
call s:HL('level13c', 'orange', '', '')
|
||||
call s:HL('level12c', 'tardis', '', '')
|
||||
call s:HL('level11c', 'lime', '', '')
|
||||
call s:HL('level10c', 'toffee', '', '')
|
||||
call s:HL('level9c', 'saltwatertaffy', '', '')
|
||||
call s:HL('level8c', 'coffee', '', '')
|
||||
call s:HL('level7c', 'dalespale', '', '')
|
||||
call s:HL('level6c', 'dress', '', '')
|
||||
call s:HL('level5c', 'orange', '', '')
|
||||
call s:HL('level4c', 'tardis', '', '')
|
||||
call s:HL('level3c', 'lime', '', '')
|
||||
call s:HL('level2c', 'toffee', '', '')
|
||||
call s:HL('level1c', 'saltwatertaffy', '', '')
|
||||
|
||||
" }}}
|
||||
" ShowMarks {{{
|
||||
|
||||
call s:HL('ShowMarksHLl', 'tardis', 'blackgravel')
|
||||
call s:HL('ShowMarksHLu', 'tardis', 'blackgravel')
|
||||
call s:HL('ShowMarksHLo', 'tardis', 'blackgravel')
|
||||
call s:HL('ShowMarksHLm', 'tardis', 'blackgravel')
|
||||
|
||||
" }}}
|
||||
|
||||
" }}}
|
||||
" Filetype-specific {{{
|
||||
|
||||
" Clojure {{{
|
||||
|
||||
call s:HL('clojureSpecial', 'taffy', '', '')
|
||||
call s:HL('clojureDefn', 'taffy', '', '')
|
||||
call s:HL('clojureDefMacro', 'taffy', '', '')
|
||||
call s:HL('clojureDefine', 'taffy', '', '')
|
||||
call s:HL('clojureMacro', 'taffy', '', '')
|
||||
call s:HL('clojureCond', 'taffy', '', '')
|
||||
|
||||
call s:HL('clojureKeyword', 'orange', '', 'none')
|
||||
|
||||
call s:HL('clojureFunc', 'dress', '', 'none')
|
||||
call s:HL('clojureRepeat', 'dress', '', 'none')
|
||||
|
||||
call s:HL('clojureParen0', 'lightgravel', '', 'none')
|
||||
|
||||
call s:HL('clojureAnonArg', 'snow', '', 'bold')
|
||||
|
||||
" }}}
|
||||
" Common Lisp {{{
|
||||
|
||||
call s:HL('lispFunc', 'lime', '', 'none')
|
||||
call s:HL('lispVar', 'orange', '', 'bold')
|
||||
call s:HL('lispEscapeSpecial', 'orange', '', 'none')
|
||||
|
||||
" }}}
|
||||
" CSS {{{
|
||||
|
||||
if g:badwolf_css_props_highlight
|
||||
call s:HL('cssColorProp', 'taffy', '', 'none')
|
||||
call s:HL('cssBoxProp', 'taffy', '', 'none')
|
||||
call s:HL('cssTextProp', 'taffy', '', 'none')
|
||||
call s:HL('cssRenderProp', 'taffy', '', 'none')
|
||||
call s:HL('cssGeneratedContentProp', 'taffy', '', 'none')
|
||||
else
|
||||
call s:HL('cssColorProp', 'fg', '', 'none')
|
||||
call s:HL('cssBoxProp', 'fg', '', 'none')
|
||||
call s:HL('cssTextProp', 'fg', '', 'none')
|
||||
call s:HL('cssRenderProp', 'fg', '', 'none')
|
||||
call s:HL('cssGeneratedContentProp', 'fg', '', 'none')
|
||||
end
|
||||
|
||||
call s:HL('cssValueLength', 'toffee', '', 'bold')
|
||||
call s:HL('cssColor', 'toffee', '', 'bold')
|
||||
call s:HL('cssBraces', 'lightgravel', '', 'none')
|
||||
call s:HL('cssIdentifier', 'orange', '', 'bold')
|
||||
call s:HL('cssClassName', 'orange', '', 'none')
|
||||
|
||||
" }}}
|
||||
" Diff {{{
|
||||
|
||||
call s:HL('gitDiff', 'lightgravel', '',)
|
||||
|
||||
call s:HL('diffRemoved', 'dress', '',)
|
||||
call s:HL('diffAdded', 'lime', '',)
|
||||
call s:HL('diffFile', 'coal', 'taffy', 'bold')
|
||||
call s:HL('diffNewFile', 'coal', 'taffy', 'bold')
|
||||
|
||||
call s:HL('diffLine', 'coal', 'orange', 'bold')
|
||||
call s:HL('diffSubname', 'orange', '', 'none')
|
||||
|
||||
" }}}
|
||||
" Django Templates {{{
|
||||
|
||||
call s:HL('djangoArgument', 'dirtyblonde', '',)
|
||||
call s:HL('djangoTagBlock', 'orange', '')
|
||||
call s:HL('djangoVarBlock', 'orange', '')
|
||||
" hi djangoStatement guifg=#ff3853 gui=bold
|
||||
" hi djangoVarBlock guifg=#f4cf86
|
||||
|
||||
" }}}
|
||||
" HTML {{{
|
||||
|
||||
" Punctuation
|
||||
call s:HL('htmlTag', 'darkroast', 'bg', 'none')
|
||||
call s:HL('htmlEndTag', 'darkroast', 'bg', 'none')
|
||||
|
||||
" Tag names
|
||||
call s:HL('htmlTagName', 'coffee', '', 'bold')
|
||||
call s:HL('htmlSpecialTagName', 'coffee', '', 'bold')
|
||||
call s:HL('htmlSpecialChar', 'lime', '', 'none')
|
||||
|
||||
" Attributes
|
||||
call s:HL('htmlArg', 'coffee', '', 'none')
|
||||
|
||||
" Stuff inside an <a> tag
|
||||
|
||||
if g:badwolf_html_link_underline
|
||||
call s:HL('htmlLink', 'lightgravel', '', 'underline')
|
||||
else
|
||||
call s:HL('htmlLink', 'lightgravel', '', 'none')
|
||||
endif
|
||||
|
||||
" }}}
|
||||
" Java {{{
|
||||
|
||||
call s:HL('javaClassDecl', 'taffy', '', 'bold')
|
||||
call s:HL('javaScopeDecl', 'taffy', '', 'bold')
|
||||
call s:HL('javaCommentTitle', 'gravel', '')
|
||||
call s:HL('javaDocTags', 'snow', '', 'none')
|
||||
call s:HL('javaDocParam', 'dalespale', '', '')
|
||||
|
||||
" }}}
|
||||
" LaTeX {{{
|
||||
|
||||
call s:HL('texStatement', 'tardis', '', 'none')
|
||||
call s:HL('texMathZoneX', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneA', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneB', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneC', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneD', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneE', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneV', 'orange', '', 'none')
|
||||
call s:HL('texMathZoneX', 'orange', '', 'none')
|
||||
call s:HL('texMath', 'orange', '', 'none')
|
||||
call s:HL('texMathMatcher', 'orange', '', 'none')
|
||||
call s:HL('texRefLabel', 'dirtyblonde', '', 'none')
|
||||
call s:HL('texRefZone', 'lime', '', 'none')
|
||||
call s:HL('texComment', 'darkroast', '', 'none')
|
||||
call s:HL('texDelimiter', 'orange', '', 'none')
|
||||
call s:HL('texZone', 'brightgravel', '', 'none')
|
||||
|
||||
augroup badwolf_tex
|
||||
au!
|
||||
|
||||
au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$" end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
augroup END
|
||||
|
||||
" }}}
|
||||
" LessCSS {{{
|
||||
|
||||
call s:HL('lessVariable', 'lime', '', 'none')
|
||||
|
||||
" }}}
|
||||
" Lispyscript {{{
|
||||
|
||||
call s:HL('lispyscriptDefMacro', 'lime', '', '')
|
||||
call s:HL('lispyscriptRepeat', 'dress', '', 'none')
|
||||
|
||||
" }}}
|
||||
" REPLs {{{
|
||||
" This isn't a specific plugin, but just useful highlight classes for anything
|
||||
" that might want to use them.
|
||||
|
||||
call s:HL('replPrompt', 'tardis', '', 'bold')
|
||||
|
||||
" }}}
|
||||
" Mail {{{
|
||||
|
||||
call s:HL('mailSubject', 'orange', '', 'bold')
|
||||
call s:HL('mailHeader', 'lightgravel', '', '')
|
||||
call s:HL('mailHeaderKey', 'lightgravel', '', '')
|
||||
call s:HL('mailHeaderEmail', 'snow', '', '')
|
||||
call s:HL('mailURL', 'toffee', '', 'underline')
|
||||
call s:HL('mailSignature', 'gravel', '', 'none')
|
||||
|
||||
call s:HL('mailQuoted1', 'gravel', '', 'none')
|
||||
call s:HL('mailQuoted2', 'dress', '', 'none')
|
||||
call s:HL('mailQuoted3', 'dirtyblonde', '', 'none')
|
||||
call s:HL('mailQuoted4', 'orange', '', 'none')
|
||||
call s:HL('mailQuoted5', 'lime', '', 'none')
|
||||
|
||||
" }}}
|
||||
" Markdown {{{
|
||||
|
||||
call s:HL('markdownHeadingRule', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownHeadingDelimiter', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownOrderedListMarker', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownListMarker', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownItalic', 'snow', '', 'bold')
|
||||
call s:HL('markdownBold', 'snow', '', 'bold')
|
||||
call s:HL('markdownH1', 'orange', '', 'bold')
|
||||
call s:HL('markdownH2', 'lime', '', 'bold')
|
||||
call s:HL('markdownH3', 'lime', '', 'none')
|
||||
call s:HL('markdownH4', 'lime', '', 'none')
|
||||
call s:HL('markdownH5', 'lime', '', 'none')
|
||||
call s:HL('markdownH6', 'lime', '', 'none')
|
||||
call s:HL('markdownLinkText', 'toffee', '', 'underline')
|
||||
call s:HL('markdownIdDeclaration', 'toffee')
|
||||
call s:HL('markdownAutomaticLink', 'toffee', '', 'bold')
|
||||
call s:HL('markdownUrl', 'toffee', '', 'bold')
|
||||
call s:HL('markdownUrldelimiter', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownLinkDelimiter', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold')
|
||||
call s:HL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold')
|
||||
call s:HL('markdownCode', 'dirtyblonde', '', 'none')
|
||||
call s:HL('markdownCodeBlock', 'dirtyblonde', '', 'none')
|
||||
|
||||
" }}}
|
||||
" MySQL {{{
|
||||
|
||||
call s:HL('mysqlSpecial', 'dress', '', 'bold')
|
||||
|
||||
" }}}
|
||||
" Python {{{
|
||||
|
||||
hi def link pythonOperator Operator
|
||||
call s:HL('pythonBuiltin', 'dress')
|
||||
call s:HL('pythonBuiltinObj', 'dress')
|
||||
call s:HL('pythonBuiltinFunc', 'dress')
|
||||
call s:HL('pythonEscape', 'dress')
|
||||
call s:HL('pythonException', 'lime', '', 'bold')
|
||||
call s:HL('pythonExceptions', 'lime', '', 'none')
|
||||
call s:HL('pythonPrecondit', 'lime', '', 'none')
|
||||
call s:HL('pythonDecorator', 'taffy', '', 'none')
|
||||
call s:HL('pythonRun', 'gravel', '', 'bold')
|
||||
call s:HL('pythonCoding', 'gravel', '', 'bold')
|
||||
|
||||
" }}}
|
||||
" SLIMV {{{
|
||||
|
||||
" Rainbow parentheses
|
||||
call s:HL('hlLevel0', 'gravel')
|
||||
call s:HL('hlLevel1', 'orange')
|
||||
call s:HL('hlLevel2', 'saltwatertaffy')
|
||||
call s:HL('hlLevel3', 'dress')
|
||||
call s:HL('hlLevel4', 'coffee')
|
||||
call s:HL('hlLevel5', 'dirtyblonde')
|
||||
call s:HL('hlLevel6', 'orange')
|
||||
call s:HL('hlLevel7', 'saltwatertaffy')
|
||||
call s:HL('hlLevel8', 'dress')
|
||||
call s:HL('hlLevel9', 'coffee')
|
||||
|
||||
" }}}
|
||||
" Vim {{{
|
||||
|
||||
call s:HL('VimCommentTitle', 'lightgravel', '', 'bold')
|
||||
|
||||
call s:HL('VimMapMod', 'dress', '', 'none')
|
||||
call s:HL('VimMapModKey', 'dress', '', 'none')
|
||||
call s:HL('VimNotation', 'dress', '', 'none')
|
||||
call s:HL('VimBracket', 'dress', '', 'none')
|
||||
|
||||
" }}}
|
||||
|
||||
" }}}
|
||||
|
||||
|
|
@ -1,672 +0,0 @@
|
|||
|
||||
set background=dark
|
||||
|
||||
hi clear
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let colors_name = "jellybeans"
|
||||
|
||||
if has("gui_running") || (has('termguicolors') && &termguicolors)
|
||||
let s:true_color = 1
|
||||
else
|
||||
let s:true_color = 0
|
||||
endif
|
||||
|
||||
if s:true_color || &t_Co >= 88
|
||||
let s:low_color = 0
|
||||
else
|
||||
let s:low_color = 1
|
||||
endif
|
||||
|
||||
" Configuration Variables:
|
||||
" - g:jellybeans_overrides (default = {})
|
||||
" - g:jellybeans_use_lowcolor_black (default = 0)
|
||||
" - g:jellybeans_use_gui_italics (default = 1)
|
||||
" - g:jellybeans_use_term_italics (default = 0)
|
||||
|
||||
let s:background_color = "000"
|
||||
|
||||
if exists("g:jellybeans_overrides")
|
||||
let s:overrides = g:jellybeans_overrides
|
||||
else
|
||||
let s:overrides = {}
|
||||
endif
|
||||
|
||||
" Backwards compatibility
|
||||
if exists("g:jellybeans_background_color")
|
||||
\ || exists("g:jellybeans_background_color_256")
|
||||
\ || exists("g:jellybeans_use_term_background_color")
|
||||
|
||||
let s:overrides = deepcopy(s:overrides)
|
||||
|
||||
if !has_key(s:overrides, "background")
|
||||
let s:overrides["background"] = {}
|
||||
endif
|
||||
|
||||
if exists("g:jellybeans_background_color")
|
||||
let s:overrides["background"]["guibg"] = g:jellybeans_background_color
|
||||
endif
|
||||
|
||||
if exists("g:jellybeans_background_color_256")
|
||||
let s:overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256
|
||||
endif
|
||||
|
||||
if exists("g:jellybeans_use_term_background_color")
|
||||
\ && g:jellybeans_use_term_background_color
|
||||
let s:overrides["background"]["ctermbg"] = "NONE"
|
||||
let s:overrides["background"]["256ctermbg"] = "NONE"
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists("g:jellybeans_use_lowcolor_black") && g:jellybeans_use_lowcolor_black
|
||||
let s:termBlack = "Black"
|
||||
else
|
||||
let s:termBlack = "Grey"
|
||||
endif
|
||||
|
||||
" When `termguicolors` is set, Vim[^1] ignores `hi Normal guibg=NONE`
|
||||
" after Normal's `guibg` is already set to a color. See:
|
||||
"
|
||||
" - https://github.com/vim/vim/issues/981
|
||||
" - https://github.com/nanotech/jellybeans.vim/issues/64
|
||||
"
|
||||
" To work around this, ensure we don't set the default background
|
||||
" color before an override changes it to `NONE` by ensuring that the
|
||||
" background color isn't set to a value different from its override.
|
||||
"
|
||||
" [^1]: Tested on 8.0.567. Does not apply to Neovim.
|
||||
"
|
||||
if has_key(s:overrides, "background") && has_key(s:overrides["background"], "guibg")
|
||||
let s:background_color = s:overrides["background"]["guibg"]
|
||||
endif
|
||||
|
||||
" Color approximation functions by Henry So, Jr. and David Liang {{{
|
||||
" Added to jellybeans.vim by Daniel Herbert
|
||||
|
||||
if &t_Co == 88
|
||||
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun! s:grey_number(x)
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun! s:grey_level(n)
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun! s:grey_color(n)
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun! s:rgb_number(x)
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun! s:rgb_level(n)
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun! s:rgb_color(x, y, z)
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
endfun
|
||||
|
||||
else " assuming &t_Co == 256
|
||||
|
||||
" returns an approximate grey index for the given grey level
|
||||
fun! s:grey_number(x)
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun! s:grey_level(n)
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun! s:grey_color(n)
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun! s:rgb_number(x)
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun! s:rgb_level(n)
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun! s:rgb_color(x, y, z)
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endfun
|
||||
|
||||
endif
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun! s:color(r, g, b)
|
||||
" map greys directly (see xterm's 256colres.pl)
|
||||
if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243
|
||||
return (a:r - 8) / 10 + 232
|
||||
endif
|
||||
|
||||
" get the closest grey
|
||||
let l:gx = s:grey_number(a:r)
|
||||
let l:gy = s:grey_number(a:g)
|
||||
let l:gz = s:grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = s:rgb_number(a:r)
|
||||
let l:y = s:rgb_number(a:g)
|
||||
let l:z = s:rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = s:grey_level(l:gx) - a:r
|
||||
let l:dgg = s:grey_level(l:gy) - a:g
|
||||
let l:dgb = s:grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = s:rgb_level(l:gx) - a:r
|
||||
let l:dg = s:rgb_level(l:gy) - a:g
|
||||
let l:db = s:rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return s:grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return s:rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return s:rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun! s:is_empty_or_none(str)
|
||||
return empty(a:str) || a:str ==? "NONE"
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun! s:rgb(rgb)
|
||||
if s:is_empty_or_none(a:rgb)
|
||||
return "NONE"
|
||||
endif
|
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||
return s:color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
fun! s:prefix_highlight_value_with(prefix, color)
|
||||
if s:is_empty_or_none(a:color)
|
||||
return "NONE"
|
||||
else
|
||||
return a:prefix . a:color
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun! s:remove_italic_attr(attr)
|
||||
let l:attr = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",")
|
||||
if empty(l:attr)
|
||||
let l:attr = "NONE"
|
||||
endif
|
||||
return l:attr
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
fun! s:X(group, fg, bg, attr, lcfg, lcbg)
|
||||
if s:low_color
|
||||
let l:cmd = "hi ".a:group.
|
||||
\ " ctermfg=".s:prefix_highlight_value_with("", a:lcfg).
|
||||
\ " ctermbg=".s:prefix_highlight_value_with("", a:lcbg)
|
||||
else
|
||||
let l:cmd = "hi ".a:group.
|
||||
\ " guifg=".s:prefix_highlight_value_with("#", a:fg).
|
||||
\ " guibg=".s:prefix_highlight_value_with("#", a:bg)
|
||||
if !s:true_color
|
||||
let l:cmd = l:cmd.
|
||||
\ " ctermfg=".s:rgb(a:fg).
|
||||
\ " ctermbg=".s:rgb(a:bg)
|
||||
endif
|
||||
endif
|
||||
|
||||
let l:attr = s:prefix_highlight_value_with("", a:attr)
|
||||
|
||||
if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics
|
||||
let l:cterm_attr = l:attr
|
||||
else
|
||||
let l:cterm_attr = s:remove_italic_attr(l:attr)
|
||||
endif
|
||||
|
||||
if !exists("g:jellybeans_use_gui_italics") || g:jellybeans_use_gui_italics
|
||||
let l:gui_attr = l:attr
|
||||
else
|
||||
let l:gui_attr = s:remove_italic_attr(l:attr)
|
||||
endif
|
||||
|
||||
let l:cmd = l:cmd." gui=".l:gui_attr." cterm=".l:cterm_attr
|
||||
exec l:cmd
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
call s:X("Normal","e8e8d3",s:background_color,"","White","")
|
||||
set background=dark
|
||||
|
||||
call s:X("CursorLine","","1c1c1c","","",s:termBlack)
|
||||
call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
|
||||
|
||||
" Some of Terminal.app's default themes have a cursor color
|
||||
" too close to Jellybeans' preferred MatchParen background
|
||||
" color to be easily distinguishable. Other terminals tend
|
||||
" to use a brighter cursor color.
|
||||
"
|
||||
" Use a more distinct color in Terminal.app, and also in
|
||||
" low-color terminals if the preferred background color is
|
||||
" not available.
|
||||
if !has('gui_running') && $TERM_PROGRAM == "Apple_Terminal"
|
||||
let s:matchParenGuiFg = "dd0093"
|
||||
let s:matchParenGuiBg = "000000"
|
||||
else
|
||||
let s:matchParenGuiFg = "ffffff"
|
||||
let s:matchParenGuiBg = "556779"
|
||||
endif
|
||||
if s:termBlack != "Black"
|
||||
let s:matchParenTermFg = "Magenta"
|
||||
let s:matchParenTermBg = ""
|
||||
else
|
||||
let s:matchParenTermFg = ""
|
||||
let s:matchParenTermBg = s:termBlack
|
||||
endif
|
||||
call s:X("MatchParen",s:matchParenGuiFg,s:matchParenGuiBg,"bold",
|
||||
\ s:matchParenTermFg,s:matchParenTermBg)
|
||||
|
||||
call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
|
||||
call s:X("TabLineFill","9098a0","","","",s:termBlack)
|
||||
call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
|
||||
|
||||
" Auto-completion
|
||||
call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
|
||||
call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
|
||||
|
||||
call s:X("Visual","","404040","","",s:termBlack)
|
||||
call s:X("Cursor",s:background_color,"b0d0f0","","","")
|
||||
|
||||
call s:X("LineNr","605958",s:background_color,"NONE",s:termBlack,"")
|
||||
call s:X("CursorLineNr","ccc5c4","","NONE","White","")
|
||||
call s:X("Comment","888888","","italic","Grey","")
|
||||
call s:X("Todo","c7c7c7","","bold","White",s:termBlack)
|
||||
|
||||
call s:X("StatusLine","000000","dddddd","italic","","White")
|
||||
call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
|
||||
call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack)
|
||||
call s:X("WildMenu","f0a0c0","302028","","Magenta","")
|
||||
|
||||
call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
|
||||
call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
|
||||
call s:X("SignColumn","777777","333333","","",s:termBlack)
|
||||
call s:X("ColorColumn","","000000","","",s:termBlack)
|
||||
|
||||
call s:X("Title","70b950","","bold","Green","")
|
||||
|
||||
call s:X("Constant","cf6a4c","","","Red","")
|
||||
call s:X("Special","799d6a","","","Green","")
|
||||
call s:X("Delimiter","668799","","","Grey","")
|
||||
|
||||
call s:X("String","99ad6a","","","Green","")
|
||||
call s:X("StringDelimiter","556633","","","DarkGreen","")
|
||||
|
||||
call s:X("Identifier","c6b6ee","","","LightCyan","")
|
||||
call s:X("Structure","8fbfdc","","","LightCyan","")
|
||||
call s:X("Function","fad07a","","","Yellow","")
|
||||
call s:X("Statement","8197bf","","","DarkBlue","")
|
||||
call s:X("PreProc","8fbfdc","","","LightBlue","")
|
||||
|
||||
hi! link Operator Structure
|
||||
hi! link Conceal Operator
|
||||
|
||||
call s:X("Type","ffb964","","","Yellow","")
|
||||
call s:X("NonText","606060",s:background_color,"",s:termBlack,"")
|
||||
|
||||
call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
|
||||
|
||||
call s:X("Search","f0a0c0","302028","underline","Magenta","")
|
||||
|
||||
call s:X("Directory","dad085","","","Yellow","")
|
||||
call s:X("ErrorMsg","","902020","","","DarkRed")
|
||||
hi! link Error ErrorMsg
|
||||
hi! link MoreMsg Special
|
||||
call s:X("Question","65C254","","","Green","")
|
||||
|
||||
|
||||
" Spell Checking
|
||||
|
||||
call s:X("SpellBad","","902020","underline","","DarkRed")
|
||||
call s:X("SpellCap","","0000df","underline","","Blue")
|
||||
call s:X("SpellRare","","540063","underline","","DarkMagenta")
|
||||
call s:X("SpellLocal","","2D7067","underline","","Green")
|
||||
|
||||
" Diff
|
||||
|
||||
hi! link diffRemoved Constant
|
||||
hi! link diffAdded String
|
||||
|
||||
" VimDiff
|
||||
|
||||
call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
|
||||
call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
|
||||
call s:X("DiffChange","","2B5B77","","White","DarkBlue")
|
||||
call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
|
||||
|
||||
" PHP
|
||||
|
||||
hi! link phpFunctions Function
|
||||
call s:X("StorageClass","c59f6f","","","Red","")
|
||||
hi! link phpSuperglobal Identifier
|
||||
hi! link phpQuoteSingle StringDelimiter
|
||||
hi! link phpQuoteDouble StringDelimiter
|
||||
hi! link phpBoolean Constant
|
||||
hi! link phpNull Constant
|
||||
hi! link phpArrayPair Operator
|
||||
hi! link phpOperator Normal
|
||||
hi! link phpRelation Normal
|
||||
hi! link phpVarSelector Identifier
|
||||
|
||||
" Python
|
||||
|
||||
hi! link pythonOperator Statement
|
||||
|
||||
" Ruby
|
||||
|
||||
hi! link rubySharpBang Comment
|
||||
call s:X("rubyClass","447799","","","DarkBlue","")
|
||||
call s:X("rubyIdentifier","c6b6fe","","","Cyan","")
|
||||
hi! link rubyConstant Type
|
||||
hi! link rubyFunction Function
|
||||
|
||||
call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","")
|
||||
call s:X("rubySymbol","7697d6","","","Blue","")
|
||||
hi! link rubyGlobalVariable rubyInstanceVariable
|
||||
hi! link rubyModule rubyClass
|
||||
call s:X("rubyControl","7597c6","","","Blue","")
|
||||
|
||||
hi! link rubyString String
|
||||
hi! link rubyStringDelimiter StringDelimiter
|
||||
hi! link rubyInterpolationDelimiter Identifier
|
||||
|
||||
call s:X("rubyRegexpDelimiter","540063","","","Magenta","")
|
||||
call s:X("rubyRegexp","dd0093","","","DarkMagenta","")
|
||||
call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
|
||||
|
||||
call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
|
||||
|
||||
" Erlang
|
||||
|
||||
hi! link erlangAtom rubySymbol
|
||||
hi! link erlangBIF rubyPredefinedIdentifier
|
||||
hi! link erlangFunction rubyPredefinedIdentifier
|
||||
hi! link erlangDirective Statement
|
||||
hi! link erlangNode Identifier
|
||||
|
||||
" Elixir
|
||||
|
||||
hi! link elixirAtom rubySymbol
|
||||
|
||||
|
||||
" JavaScript
|
||||
|
||||
hi! link javaScriptValue Constant
|
||||
hi! link javaScriptRegexpString rubyRegexp
|
||||
hi! link javaScriptTemplateVar StringDelim
|
||||
hi! link javaScriptTemplateDelim Identifier
|
||||
hi! link javaScriptTemplateString String
|
||||
|
||||
" CoffeeScript
|
||||
|
||||
hi! link coffeeRegExp javaScriptRegexpString
|
||||
|
||||
" Lua
|
||||
|
||||
hi! link luaOperator Conditional
|
||||
|
||||
" C
|
||||
|
||||
hi! link cFormat Identifier
|
||||
hi! link cOperator Constant
|
||||
|
||||
" Objective-C/Cocoa
|
||||
|
||||
hi! link objcClass Type
|
||||
hi! link cocoaClass objcClass
|
||||
hi! link objcSubclass objcClass
|
||||
hi! link objcSuperclass objcClass
|
||||
hi! link objcDirective rubyClass
|
||||
hi! link objcStatement Constant
|
||||
hi! link cocoaFunction Function
|
||||
hi! link objcMethodName Identifier
|
||||
hi! link objcMethodArg Normal
|
||||
hi! link objcMessageName Identifier
|
||||
|
||||
" Vimscript
|
||||
|
||||
hi! link vimOper Normal
|
||||
|
||||
" HTML
|
||||
|
||||
hi! link htmlTag Statement
|
||||
hi! link htmlEndTag htmlTag
|
||||
hi! link htmlTagName htmlTag
|
||||
|
||||
" XML
|
||||
|
||||
hi! link xmlTag Statement
|
||||
hi! link xmlEndTag xmlTag
|
||||
hi! link xmlTagName xmlTag
|
||||
hi! link xmlEqual xmlTag
|
||||
hi! link xmlEntity Special
|
||||
hi! link xmlEntityPunct xmlEntity
|
||||
hi! link xmlDocTypeDecl PreProc
|
||||
hi! link xmlDocTypeKeyword PreProc
|
||||
hi! link xmlProcessingDelim xmlAttrib
|
||||
|
||||
" Debugger.vim
|
||||
|
||||
call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
|
||||
call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
|
||||
|
||||
" vim-indent-guides
|
||||
|
||||
if !exists("g:indent_guides_auto_colors")
|
||||
let g:indent_guides_auto_colors = 0
|
||||
endif
|
||||
call s:X("IndentGuidesOdd","","232323","","","")
|
||||
call s:X("IndentGuidesEven","","1b1b1b","","","")
|
||||
|
||||
" Plugins, etc.
|
||||
|
||||
hi! link TagListFileName Directory
|
||||
call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
|
||||
|
||||
" Manual overrides for 256-color terminals. Dark colors auto-map badly.
|
||||
if !s:low_color
|
||||
hi StatusLineNC ctermbg=235
|
||||
hi Folded ctermbg=236
|
||||
hi DiffText ctermfg=81
|
||||
hi DbgBreakPt ctermbg=53
|
||||
hi IndentGuidesOdd ctermbg=235
|
||||
hi IndentGuidesEven ctermbg=234
|
||||
endif
|
||||
|
||||
if !empty("s:overrides")
|
||||
fun! s:current_attr(group)
|
||||
let l:synid = synIDtrans(hlID(a:group))
|
||||
let l:attrs = []
|
||||
for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"]
|
||||
if synIDattr(l:synid, l:attr, "gui") == 1
|
||||
call add(l:attrs, l:attr)
|
||||
endif
|
||||
endfor
|
||||
return join(l:attrs, ",")
|
||||
endfun
|
||||
fun! s:current_color(group, what, mode)
|
||||
let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
|
||||
if l:color == -1
|
||||
return ""
|
||||
else
|
||||
return substitute(l:color, "^#", "", "")
|
||||
endif
|
||||
endfun
|
||||
fun! s:load_color_def(group, def)
|
||||
call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")),
|
||||
\ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")),
|
||||
\ get(a:def, "attr", s:current_attr(a:group)),
|
||||
\ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")),
|
||||
\ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm")))
|
||||
if !s:low_color
|
||||
for l:prop in ["ctermfg", "ctermbg"]
|
||||
let l:override_key = "256".l:prop
|
||||
if has_key(a:def, l:override_key)
|
||||
exec "hi ".a:group." ".l:prop."=".a:def[l:override_key]
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endfun
|
||||
fun! s:load_colors(defs)
|
||||
for [l:group, l:def] in items(a:defs)
|
||||
if l:group == "background"
|
||||
call s:load_color_def("LineNr", l:def)
|
||||
call s:load_color_def("NonText", l:def)
|
||||
call s:load_color_def("Normal", l:def)
|
||||
else
|
||||
call s:load_color_def(l:group, l:def)
|
||||
endif
|
||||
unlet l:group
|
||||
unlet l:def
|
||||
endfor
|
||||
endfun
|
||||
call s:load_colors(s:overrides)
|
||||
delf s:load_colors
|
||||
delf s:load_color_def
|
||||
delf s:current_color
|
||||
delf s:current_attr
|
||||
endif
|
||||
|
||||
" delete functions {{{
|
||||
delf s:X
|
||||
delf s:remove_italic_attr
|
||||
delf s:prefix_highlight_value_with
|
||||
delf s:rgb
|
||||
delf s:is_empty_or_none
|
||||
delf s:color
|
||||
delf s:rgb_color
|
||||
delf s:rgb_level
|
||||
delf s:rgb_number
|
||||
delf s:grey_color
|
||||
delf s:grey_level
|
||||
delf s:grey_number
|
||||
" }}}
|
||||
|
|
@ -1,261 +0,0 @@
|
|||
" Quantum - A 24-bit Material color scheme for Vim
|
||||
" Author: Brandon Siders
|
||||
" License: MIT
|
||||
|
||||
highlight clear
|
||||
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
set background=dark
|
||||
let g:colors_name = 'quantum'
|
||||
|
||||
let g:quantum_italics = get(g:, 'quantum_italics', 0)
|
||||
let g:quantum_black = get(g:, 'quantum_black', 0)
|
||||
|
||||
" Color Palette
|
||||
let s:gray1 = g:quantum_black ? '#000000' : '#000'
|
||||
let s:gray2 = g:quantum_black ? '#292929' : '#2c3a41'
|
||||
let s:gray3 = g:quantum_black ? '#474646' : '#425762'
|
||||
let s:gray4 = g:quantum_black ? '#6a6c6c' : '#658494'
|
||||
let s:gray5 = g:quantum_black ? '#b7bdc0' : '#aebbc5'
|
||||
let s:red = '#dd7186'
|
||||
let s:green = '#87bb7c'
|
||||
let s:yellow = '#d5b875'
|
||||
let s:blue = '#70ace5'
|
||||
let s:purple = '#a48add'
|
||||
let s:cyan = '#69c5ce'
|
||||
let s:orange = '#d7956e'
|
||||
let s:indigo = '#7681de'
|
||||
|
||||
function! s:HL(group, fg, bg, attr)
|
||||
let l:attr = a:attr
|
||||
if !g:quantum_italics && l:attr ==# 'italic'
|
||||
let l:attr = 'none'
|
||||
endif
|
||||
|
||||
if !empty(a:fg)
|
||||
exec 'hi ' . a:group . ' guifg=' . a:fg
|
||||
endif
|
||||
if !empty(a:bg)
|
||||
exec 'hi ' . a:group . ' guibg=' . a:bg
|
||||
endif
|
||||
if !empty(a:attr)
|
||||
exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr
|
||||
endif
|
||||
endfun
|
||||
|
||||
" Vim Editor
|
||||
call s:HL('ColorColumn', '', s:gray2, '')
|
||||
call s:HL('Cursor', s:gray2, s:gray5, '')
|
||||
call s:HL('CursorColumn', '', s:gray2, '')
|
||||
call s:HL('CursorLine', '', s:gray2, 'none')
|
||||
call s:HL('CursorLineNr', s:cyan, s:gray2, 'none')
|
||||
call s:HL('Directory', s:blue, '', '')
|
||||
call s:HL('DiffAdd', s:green, s:gray2, 'none')
|
||||
call s:HL('DiffChange', s:yellow, s:gray2, 'none')
|
||||
call s:HL('DiffDelete', s:red, s:gray2, 'none')
|
||||
call s:HL('DiffText', s:blue, s:gray2, 'none')
|
||||
call s:HL('ErrorMsg', s:red, s:gray1, 'bold')
|
||||
call s:HL('FoldColumn', s:gray4, s:gray1, '')
|
||||
call s:HL('Folded', s:gray3, s:gray1, '')
|
||||
call s:HL('IncSearch', s:gray1, 's:gray5', '')
|
||||
call s:HL('LineNr', s:gray3, '', '')
|
||||
call s:HL('MatchParen', s:gray4, s:cyan, 'bold')
|
||||
call s:HL('ModeMsg', s:green, '', '')
|
||||
call s:HL('MoreMsg', s:green, '', '')
|
||||
call s:HL('NonText', s:gray4, '', 'none')
|
||||
call s:HL('Normal', s:gray5, s:gray1, 'none')
|
||||
call s:HL('Pmenu', s:gray5, s:gray3, '')
|
||||
call s:HL('PmenuSbar', '', s:gray2, '')
|
||||
call s:HL('PmenuSel', s:gray2, s:cyan, '')
|
||||
call s:HL('PmenuThumb', '', s:gray4, '')
|
||||
call s:HL('Question', s:blue, '', 'none')
|
||||
call s:HL('Search', s:yellow, s:gray1, '')
|
||||
call s:HL('SignColumn', s:gray5, s:gray1, '')
|
||||
call s:HL('SpecialKey', s:gray4, '', '')
|
||||
call s:HL('SpellCap', s:blue, s:gray2, 'undercurl')
|
||||
call s:HL('SpellBad', s:red, s:gray2, 'undercurl')
|
||||
call s:HL('StatusLine', s:gray5, s:gray3, 'none')
|
||||
call s:HL('StatusLineNC', s:gray2, s:gray4, '')
|
||||
call s:HL('TabLine', s:gray4, s:gray2, 'none')
|
||||
call s:HL('TabLineFill', s:gray4, s:gray2, 'none')
|
||||
call s:HL('TabLineSel', s:yellow, s:gray3, 'none')
|
||||
call s:HL('Title', s:green, '', 'none')
|
||||
call s:HL('VertSplit', s:gray4, s:gray1, 'none')
|
||||
call s:HL('Visual', s:gray5, s:gray3, '')
|
||||
call s:HL('WarningMsg', s:red, '', '')
|
||||
call s:HL('WildMenu', s:gray2, s:cyan, '')
|
||||
|
||||
" Standard Syntax
|
||||
call s:HL('Comment', s:gray4, '', 'italic')
|
||||
call s:HL('Constant', s:orange, '', '')
|
||||
call s:HL('String', s:green, '', '')
|
||||
call s:HL('Character', s:green, '', '')
|
||||
call s:HL('Identifier', s:red, '', 'none')
|
||||
call s:HL('Function', s:blue, '', '')
|
||||
call s:HL('Statement', s:purple, '', 'none')
|
||||
call s:HL('Operator', s:cyan, '', '')
|
||||
call s:HL('PreProc', s:cyan, '', '')
|
||||
call s:HL('Include', s:blue, '', '')
|
||||
call s:HL('Define', s:purple, '', 'none')
|
||||
call s:HL('Macro', s:purple, '', '')
|
||||
call s:HL('Type', s:yellow, '', 'none')
|
||||
call s:HL('Structure', s:cyan, '', '')
|
||||
call s:HL('Special', s:indigo, '', '')
|
||||
call s:HL('Underlined', s:blue, '', 'none')
|
||||
call s:HL('Error', s:red, s:gray1, 'bold')
|
||||
call s:HL('Todo', s:orange, s:gray1, 'bold')
|
||||
|
||||
" CSS
|
||||
call s:HL('cssAttrComma', s:gray5, '', '')
|
||||
call s:HL('cssPseudoClassId', s:yellow, '', '')
|
||||
call s:HL('cssBraces', s:gray5, '', '')
|
||||
call s:HL('cssClassName', s:yellow, '', '')
|
||||
call s:HL('cssClassNameDot', s:yellow, '', '')
|
||||
call s:HL('cssFunctionName', s:blue, '', '')
|
||||
call s:HL('cssImportant', s:cyan, '', '')
|
||||
call s:HL('cssIncludeKeyword', s:purple, '', '')
|
||||
call s:HL('cssTagName', s:red, '', '')
|
||||
call s:HL('cssMediaType', s:orange, '', '')
|
||||
call s:HL('cssProp', s:gray5, '', '')
|
||||
call s:HL('cssSelectorOp', s:cyan, '', '')
|
||||
call s:HL('cssSelectorOp2', s:cyan, '', '')
|
||||
|
||||
" Commit Messages (Git)
|
||||
call s:HL('gitcommitHeader', s:purple, '', '')
|
||||
call s:HL('gitcommitUnmerged', s:green, '', '')
|
||||
call s:HL('gitcommitSelectedFile', s:green, '', '')
|
||||
call s:HL('gitcommitDiscardedFile', s:red, '', '')
|
||||
call s:HL('gitcommitUnmergedFile', s:yellow, '', '')
|
||||
call s:HL('gitcommitSelectedType', s:green, '', '')
|
||||
call s:HL('gitcommitSummary', s:blue, '', '')
|
||||
call s:HL('gitcommitDiscardedType', s:red, '', '')
|
||||
hi link gitcommitNoBranch gitcommitBranch
|
||||
hi link gitcommitUntracked gitcommitComment
|
||||
hi link gitcommitDiscarded gitcommitComment
|
||||
hi link gitcommitSelected gitcommitComment
|
||||
hi link gitcommitDiscardedArrow gitcommitDiscardedFile
|
||||
hi link gitcommitSelectedArrow gitcommitSelectedFile
|
||||
hi link gitcommitUnmergedArrow gitcommitUnmergedFile
|
||||
|
||||
" HTML
|
||||
call s:HL('htmlEndTag', s:blue, '', '')
|
||||
call s:HL('htmlLink', s:red, '', '')
|
||||
call s:HL('htmlTag', s:blue, '', '')
|
||||
call s:HL('htmlTitle', s:gray5, '', '')
|
||||
call s:HL('htmlSpecialTagName', s:purple, '', '')
|
||||
|
||||
" Javascript
|
||||
call s:HL('javaScriptBraces', s:gray5, '', '')
|
||||
call s:HL('javaScriptNull', s:orange, '', '')
|
||||
call s:HL('javaScriptIdentifier', s:purple, '', '')
|
||||
call s:HL('javaScriptNumber', s:orange, '', '')
|
||||
call s:HL('javaScriptRequire', s:cyan, '', '')
|
||||
call s:HL('javaScriptReserved', s:purple, '', '')
|
||||
" pangloss/vim-javascript
|
||||
call s:HL('jsArrowFunction', s:purple, '', '')
|
||||
call s:HL('jsAsyncKeyword', s:purple, '', '')
|
||||
call s:HL('jsExtendsKeyword', s:purple, '', '')
|
||||
call s:HL('jsClassKeyword', s:purple, '', '')
|
||||
call s:HL('jsDocParam', s:green, '', '')
|
||||
call s:HL('jsDocTags', s:cyan, '', '')
|
||||
call s:HL('jsForAwait', s:purple, '', '')
|
||||
call s:HL('jsFlowArgumentDef', s:yellow, '', '')
|
||||
call s:HL('jsFrom', s:purple, '', '')
|
||||
call s:HL('jsImport', s:purple, '', '')
|
||||
call s:HL('jsExport', s:purple, '', '')
|
||||
call s:HL('jsExportDefault', s:purple, '', '')
|
||||
call s:HL('jsFuncCall', s:blue, '', '')
|
||||
call s:HL('jsFunction', s:purple, '', '')
|
||||
call s:HL('jsGlobalObjects', s:yellow, '', '')
|
||||
call s:HL('jsGlobalNodeObjects', s:yellow, '', '')
|
||||
call s:HL('jsModuleAs', s:purple, '', '')
|
||||
call s:HL('jsNull', s:orange, '', '')
|
||||
call s:HL('jsStorageClass', s:purple, '', '')
|
||||
call s:HL('jsTemplateBraces', s:red, '', '')
|
||||
call s:HL('jsTemplateExpression', s:red, '', '')
|
||||
call s:HL('jsThis', s:red, '', '')
|
||||
call s:HL('jsUndefined', s:orange, '', '')
|
||||
|
||||
" JSON
|
||||
call s:HL('jsonBraces', s:gray5, '', '')
|
||||
|
||||
" Less
|
||||
call s:HL('lessAmpersand', s:red, '', '')
|
||||
call s:HL('lessClassChar', s:yellow, '', '')
|
||||
call s:HL('lessCssAttribute', s:gray5, '', '')
|
||||
call s:HL('lessFunction', s:blue, '', '')
|
||||
call s:HL('lessVariable', s:purple, '', '')
|
||||
|
||||
" Markdown
|
||||
call s:HL('markdownBold', s:yellow, '', 'bold')
|
||||
call s:HL('markdownCode', s:cyan, '', '')
|
||||
call s:HL('markdownCodeBlock', s:cyan, '', '')
|
||||
call s:HL('markdownCodeDelimiter', s:cyan, '', '')
|
||||
call s:HL('markdownHeadingDelimiter', s:green, '', '')
|
||||
call s:HL('markdownHeadingRule', s:gray4, '', '')
|
||||
call s:HL('markdownId', s:purple, '', '')
|
||||
call s:HL('markdownItalic', s:blue, '', 'italic')
|
||||
call s:HL('markdownListMarker', s:orange, '', '')
|
||||
call s:HL('markdownOrderedListMarker', s:orange, '', '')
|
||||
call s:HL('markdownRule', s:gray4, '', '')
|
||||
call s:HL('markdownUrl', s:purple, '', '')
|
||||
call s:HL('markdownUrlTitleDelimiter', s:green, '', '')
|
||||
|
||||
" Ruby
|
||||
call s:HL('rubyInterpolation', s:cyan, '', '')
|
||||
call s:HL('rubyInterpolationDelimiter', s:indigo, '', '')
|
||||
call s:HL('rubyRegexp', s:cyan, '', '')
|
||||
call s:HL('rubyRegexpDelimiter', s:indigo, '', '')
|
||||
call s:HL('rubyStringDelimiter', s:green, '', '')
|
||||
|
||||
" Sass
|
||||
call s:HL('sassAmpersand', s:red, '', '')
|
||||
call s:HL('sassClassChar', s:yellow, '', '')
|
||||
call s:HL('sassMixinName', s:blue, '', '')
|
||||
call s:HL('sassVariable', s:purple, '', '')
|
||||
|
||||
" Vim-Fugitive
|
||||
call s:HL('diffAdded', s:green, '', '')
|
||||
call s:HL('diffRemoved', s:red, '', '')
|
||||
|
||||
" Vim-Gittgutter
|
||||
call s:HL('GitGutterAdd', s:green, '', '')
|
||||
call s:HL('GitGutterChange', s:yellow, '', '')
|
||||
call s:HL('GitGutterChangeDelete', s:orange, '', '')
|
||||
call s:HL('GitGutterDelete', s:red, '', '')
|
||||
|
||||
" Vim-Signify
|
||||
hi link SignifySignAdd GitGutterAdd
|
||||
hi link SignifySignChange GitGutterChange
|
||||
hi link SignifySignDelete GitGutterDelete
|
||||
|
||||
" XML
|
||||
call s:HL('xmlAttrib', s:yellow, '', '')
|
||||
call s:HL('xmlEndTag', s:blue, '', '')
|
||||
call s:HL('xmlTag', s:blue, '', '')
|
||||
call s:HL('xmlTagName', s:blue, '', '')
|
||||
|
||||
" Neovim terminal colors
|
||||
if has('nvim')
|
||||
let g:terminal_color_0 = s:gray1
|
||||
let g:terminal_color_1 = s:red
|
||||
let g:terminal_color_2 = s:green
|
||||
let g:terminal_color_3 = s:yellow
|
||||
let g:terminal_color_4 = s:blue
|
||||
let g:terminal_color_5 = s:purple
|
||||
let g:terminal_color_6 = s:cyan
|
||||
let g:terminal_color_7 = s:gray5
|
||||
let g:terminal_color_8 = s:gray3
|
||||
let g:terminal_color_9 = s:red
|
||||
let g:terminal_color_10 = s:green
|
||||
let g:terminal_color_11 = s:yellow
|
||||
let g:terminal_color_12 = s:blue
|
||||
let g:terminal_color_13 = s:purple
|
||||
let g:terminal_color_14 = s:cyan
|
||||
let g:terminal_color_15 = s:gray4
|
||||
let g:terminal_color_background = g:terminal_color_0
|
||||
let g:terminal_color_foreground = g:terminal_color_7
|
||||
endif
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
|
||||
" Goyo mappings
|
||||
nmap <C-g> :Goyo 60x60
|
||||
|
||||
" Enable the Vue Language server
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'vue': ['vls']
|
||||
\ }
|
||||
|
||||
" init rainbow brackets
|
||||
"set to 0 if you want to enable it later via :RainbowToggle
|
||||
let g:rainbow_active = 0
|
||||
|
||||
" Emmet mappings
|
||||
let g:user_emmet_mode='a' " enable all functions in all modes
|
||||
let g:user_emmet_leader_key='<C-S>'
|
||||
|
||||
" Devicon Configurations
|
||||
" loading the plugin
|
||||
let g:webdevicons_enable = 1
|
||||
|
||||
" Indention Config
|
||||
let g:indentLine_char = '┊'
|
||||
|
||||
|
||||
" Lightline Themes Configurations
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'simpleblack',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'cocstatus': 'coc#status'
|
||||
\ },
|
||||
\ }
|
||||
|
||||
|
||||
" Use auocmd to force lightline update.
|
||||
autocmd User CocStatusChange,CocDiagnosticChange call lightline#update()
|
||||
|
||||
" Fancy markdown syntax
|
||||
let g:markdown_fenced_languages = ['css', 'js=javascript']
|
||||
|
||||
" +++++++++++++++++++++ vim-float-term configuration +++++++++++++++++++++++++
|
||||
|
||||
let g:floaterm_keymap_new = '<leader>.'
|
||||
let g:floaterm_position = 'center'
|
||||
let g:floaterm_type = 'normal'
|
||||
|
||||
" custom mappings for my person tools in normal mode only
|
||||
nnoremap <C-p> :FloatermNew ipython<CR>
|
||||
nnoremap <C-l> :FloatermNew lf<CR>
|
||||
nnoremap <C-s> :FloatermNew sefr<CR>
|
||||
|
||||
" +++++++++++++++++++++++++ Conquer of Completion +++++++++++++++++++++++++
|
||||
|
||||
" if hidden is not set, TextEdit might fail.
|
||||
set hidden
|
||||
|
||||
" Some servers have issues with backup files, see #649
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
|
||||
" Better display for messages
|
||||
set cmdheight=2
|
||||
|
||||
" You will have bad experience for diagnostic messages when it's default 4000.
|
||||
set updatetime=300
|
||||
|
||||
" don't give |ins-completion-menu| messages.
|
||||
set shortmess+=c
|
||||
|
||||
" always show signcolumns
|
||||
set signcolumn=yes
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||
" Coc only does snippet and additional edit on confirm.
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
" Or use `complete_info` if your vim support it, like:
|
||||
" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" Remap keys for gotos
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use K to show documentation in preview window
|
||||
"nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight symbol under cursor on CursorHold
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Remap for rename current word
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Remap for format selected region
|
||||
xmap <leader>fr <Plug>(coc-format-selected)
|
||||
nmap <leader>fr <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap for do codeAction of current line
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Fix autofix problem of current line
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
" Create mappings for function text object, requires document symbols feature of languageserver.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
|
||||
" Use <TAB> for select selections ranges, needs server support, like: coc-tsserver, coc-python
|
||||
nmap <silent> <TAB> <Plug>(coc-range-select)
|
||||
xmap <silent> <TAB> <Plug>(coc-range-select)
|
||||
|
||||
" Use `:Format` to format current buffer
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Use `:Fold` to fold current buffer
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" use `:OR` for organize import of current buffer
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||
|
||||
" Add status line support, for integration with other plugin, checkout `:h coc-status`
|
||||
set statusline^=%{StatusDiagnostic()}
|
||||
|
||||
" Using CocList
|
||||
" Show all diagnostics
|
||||
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions
|
||||
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands
|
||||
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document
|
||||
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols
|
||||
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list
|
||||
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
||||
|
||||
" Auto command for python projects
|
||||
autocmd FileType python let b:coc_root_patterns = ['.git', '.env']
|
||||
|
||||
" Auto command for correct comment highlighting in Json files
|
||||
autocmd FileType json syntax match Comment +\/\/.\+$+
|
||||
" status line function
|
||||
function! StatusDiagnostic() abort
|
||||
let info = get(b:, 'coc_diagnostic_info', {})
|
||||
if empty(info) | return '' | endif
|
||||
let msgs = []
|
||||
if get(info, 'error', 0)
|
||||
call add(msgs, 'E' . info['error'])
|
||||
endif
|
||||
if get(info, 'warning', 0)
|
||||
call add(msgs, 'W' . info['warning'])
|
||||
endif
|
||||
return join(msgs, ' ') . ' ' . get(g:, 'coc_status', '')
|
||||
endfunction
|
||||
|
||||
" Disable node version warning
|
||||
let g:coc_disable_startup_warning = 1
|
||||
|
||||
" Vim script coc extension
|
||||
let g:markdown_fenced_languages = [
|
||||
\ 'vim',
|
||||
\ 'help'
|
||||
\]
|
||||
|
||||
" Emoji completion
|
||||
set completefunc=emoji#complete
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/custom.vim
|
||||
|
|
@ -1,339 +0,0 @@
|
|||
" Vim-plug initialization
|
||||
let vim_plug_just_installed = 0
|
||||
let vim_plug_path = expand('~/.config/nvim/autoload/plug.vim')
|
||||
if !filereadable(vim_plug_path)
|
||||
echo "Installing Vim-plug..."
|
||||
echo "" silent !mkdir -p ~/.config/nvim/autoload
|
||||
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
let vim_plug_just_installed = 1
|
||||
endif
|
||||
|
||||
" manually load vim-plug the first time
|
||||
if vim_plug_just_installed
|
||||
:execute 'source '.fnameescape(vim_plug_path)
|
||||
:PlugInstall
|
||||
endif
|
||||
|
||||
" ============================================================================
|
||||
" Active plugins
|
||||
call plug#begin('~/.config/nvim/plugged')
|
||||
|
||||
" Now the actual plugins:
|
||||
" rainbow brackets
|
||||
Plug 'luochen1990/rainbow'
|
||||
|
||||
" Vim emoji
|
||||
Plug 'junegunn/vim-emoji'
|
||||
|
||||
" quick commenter
|
||||
Plug 'preservim/nerdcommenter'
|
||||
|
||||
" Conquer of Completion
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
|
||||
" Override configs by directory
|
||||
Plug 'arielrossanigo/dir-configs-override.vim'
|
||||
|
||||
" Better file browser
|
||||
Plug 'scrooloose/nerdtree'
|
||||
|
||||
" Class/module browser
|
||||
Plug 'majutsushi/tagbar'
|
||||
" TODO known problems:
|
||||
" * current block not refreshing'
|
||||
|
||||
" Search results counter
|
||||
Plug 'vim-scripts/IndexedSearch'
|
||||
|
||||
" Plugin for live preview of LaTex
|
||||
Plug 'donRaphaco/neotex', {'for': 'tex'}
|
||||
|
||||
" Integrated Floating terminal
|
||||
Plug 'voldikss/vim-floaterm'
|
||||
|
||||
" Lightline
|
||||
Plug 'itchyny/lightline.vim'
|
||||
|
||||
" Code and files fuzzy finder
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
|
||||
" Pending tasks list
|
||||
Plug 'fisadev/FixedTaskList.vim'
|
||||
|
||||
" Completion from other opened files
|
||||
Plug 'Shougo/context_filetype.vim'
|
||||
|
||||
" Automatically close parenthesis, etc
|
||||
Plug 'Townk/vim-autoclose'
|
||||
|
||||
" Indent text object
|
||||
Plug 'michaeljsmith/vim-indent-object'
|
||||
|
||||
" Indentation based movements
|
||||
Plug 'jeetsukumaran/vim-indentwise'
|
||||
|
||||
" Better language packs
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" Ack code search (requires ack installed in the system)
|
||||
Plug 'mileszs/ack.vim'
|
||||
" TODO is there a way to prevent the progress which hides the editor?
|
||||
|
||||
" Paint css colors with the real color
|
||||
Plug 'lilydjwg/colorizer'
|
||||
" TODO is there a better option for neovim?
|
||||
|
||||
" Generate html in a simple way
|
||||
Plug 'mattn/emmet-vim'
|
||||
|
||||
" Git integration
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" Git/mercurial/others diff icons on the side of the file lines
|
||||
Plug 'mhinz/vim-signify'
|
||||
|
||||
" Linters
|
||||
Plug 'neomake/neomake'
|
||||
" TODO is it running on save? or when?
|
||||
" TODO not detecting errors, just style, is it using pylint?
|
||||
|
||||
" Nice icons: Need to install patched font for this to work
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
|
||||
" add or override individual additional filetypes
|
||||
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
|
||||
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['mkv'] = 'ƛ'
|
||||
|
||||
" Show indention level through lines
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" Distraction free programming
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
" Tell vim-plug we finished declaring plugins, so it can load them
|
||||
call plug#end()
|
||||
|
||||
" ============================================================================
|
||||
" Install plugins the first time vim runs
|
||||
if vim_plug_just_installed
|
||||
echo "Installing Bundles, please ignore key map error messages"
|
||||
:PlugInstall
|
||||
endif
|
||||
|
||||
" ============================================================================
|
||||
" Vim settings and mappings
|
||||
|
||||
" remap default leader key to comma
|
||||
let mapleader = ","
|
||||
nnoremap <leader>vr :source $MYVIMRC<CR>
|
||||
nnoremap <leader>vc :e $MYVIMRC<CR>
|
||||
|
||||
|
||||
" Change Ctrl N mapping to Ctrl Space "
|
||||
inoremap <C-space> <C-n>
|
||||
|
||||
"" Make vim scroll faster
|
||||
set ttyfast
|
||||
set mouse=a
|
||||
set lazyredraw
|
||||
set nu
|
||||
set nowrap
|
||||
set relativenumber
|
||||
set encoding=UTF-8
|
||||
" set tabline to not display full path
|
||||
set guitablabel=%t
|
||||
|
||||
|
||||
" Set tabs for certain file types
|
||||
" for html and css js and vue
|
||||
autocmd FileType html setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType css setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType scss setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType javascript setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType json setlocal ts=4 sw=4 expandtab
|
||||
autocmd FileType vue setlocal ts=2 sw=2 expandtab
|
||||
" Set expand width to 2 for C/C++
|
||||
autocmd FileType cpp setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType c setlocal ts=2 sw=2 expandtab
|
||||
" Set expand width to 2 for Shell scripts and perl
|
||||
autocmd FileType sh setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType zsh setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType bash setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType perl setlocal ts=2 sw=2 expandtab
|
||||
" Set expand width to 2 for markdown
|
||||
autocmd FileType md setlocal ts=2 sw=2 expandtab
|
||||
autocmd FileType markdown setlocal ts=2 sw=2 expandtab
|
||||
|
||||
" " Copy to clipboard
|
||||
vnoremap <leader>y "+y
|
||||
nnoremap <leader>Y "+yg_
|
||||
nnoremap <leader>y "+y
|
||||
nnoremap <leader>yy "+yy
|
||||
|
||||
" " Paste from clipboard
|
||||
nnoremap <leader>p "+p
|
||||
nnoremap <leader>P "+P
|
||||
vnoremap <leader>p "+p
|
||||
vnoremap <leader>P "+P
|
||||
|
||||
|
||||
" Run xrdb whenever Xdefaults or Xresources are updated.
|
||||
autocmd BufWritePost *Xresources,*Xdefaults !xrdb %
|
||||
|
||||
" Recompile suckless programs. only for files that are config.h
|
||||
autocmd BufWritePost config.h,config.def.h !sudo make install; make clean
|
||||
|
||||
" Comile any latex document into pdf form
|
||||
autocmd BufWritePost answers.tex !pdflatex answers.tex
|
||||
|
||||
" Compile VIU markdown notes to pdf
|
||||
autocmd BufWritePost notes.md !pandoc -s -o notes.pdf notes.md
|
||||
|
||||
|
||||
" tabs and spaces handling
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
" remove ugly vertical lines on window division
|
||||
set fillchars+=vert:\
|
||||
|
||||
"" Color Scheme set up for Material ===============================
|
||||
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
|
||||
|
||||
" < https://github.com/neovim/neovim/wiki/Following-HEAD #20160511 >
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
" use 256 colors when possible
|
||||
if (&term =~? 'mlterm\|xterm\|xterm-256\|screen-256') || has('nvim')
|
||||
let &t_Co = 256
|
||||
syntax on
|
||||
set background=light
|
||||
colorscheme quantum
|
||||
else
|
||||
colorscheme jellybeans
|
||||
endif
|
||||
|
||||
|
||||
" autocompletion of files and commands behaves like shell
|
||||
" (complete only the common part, list the options that match)
|
||||
set wildmode=list:longest
|
||||
|
||||
" save as sudo
|
||||
ca w!! w !sudo tee "%"
|
||||
|
||||
" tab navigation mappings
|
||||
map tt :tabnew
|
||||
map <M-Right> :tabn<CR>
|
||||
imap <M-Right> <ESC>:tabn<CR>
|
||||
map <M-Left> :tabp<CR>
|
||||
imap <M-Left> <ESC>:tabp<CR>
|
||||
|
||||
|
||||
" when scrolling, keep cursor 3 lines away from screen border
|
||||
set scrolloff=3
|
||||
|
||||
" clear search results
|
||||
nnoremap <silent> // :noh<CR>
|
||||
|
||||
" clear empty spaces at the end of lines on save of python files
|
||||
"autocmd BufWritePre *.py :%s/\s\+$//e
|
||||
|
||||
" fix problems with uncommon shells (fish, xonsh) and plugins running commands
|
||||
" (neomake, ...)
|
||||
set shell=$SHELL
|
||||
|
||||
" Ability to add python breakpoints
|
||||
" (I use ipdb, but you can change it to whatever tool you use for debugging)
|
||||
au FileType python map <silent> <leader>b Oimport ipdb; ipdb.set_trace()<esc>
|
||||
|
||||
" ============================================================================
|
||||
" Plugins settings and mappings
|
||||
" Edit them as you wish.
|
||||
|
||||
" Tagbar -----------------------------
|
||||
" toggle tagbar display
|
||||
nmap <leader>tb :TagbarToggle<CR>
|
||||
" autofocus on tagbar open
|
||||
let g:tagbar_autofocus = 1
|
||||
|
||||
" NERDTree -----------------------------
|
||||
" toggle nerdtree display
|
||||
map <leader>nn :NERDTreeToggle<CR>
|
||||
" open nerdtree with the current file selected
|
||||
nmap <leader>nf :NERDTreeFind<CR>
|
||||
" don;t show these file types
|
||||
let NERDTreeIgnore = ['\.pyc$', '\.pyo$']
|
||||
|
||||
" Tasklist ------------------------------
|
||||
" show pending tasks list
|
||||
map <leader>tl :TaskList<CR>
|
||||
|
||||
" Neomake ------------------------------
|
||||
" Run linter on write
|
||||
autocmd! BufWritePost * Neomake
|
||||
|
||||
" Check code as python3 by default
|
||||
let g:neomake_python_python_maker = neomake#makers#ft#python#python()
|
||||
let g:neomake_python_flake8_maker = neomake#makers#ft#python#flake8()
|
||||
let g:neomake_python_python_maker.exe = 'python3 -m py_compile'
|
||||
let g:neomake_python_flake8_maker.exe = 'python3 -m flake8'
|
||||
|
||||
" Disable error messages inside the buffer, next to the problematic line
|
||||
let g:neomake_virtualtext_current_error = 1
|
||||
|
||||
|
||||
" Fzf ------------------------------
|
||||
" file finder mapping
|
||||
nmap <leader>e :Files<CR>
|
||||
" tags (symbols) in current file finder mapping
|
||||
nmap <leader>g :BTag<CR>
|
||||
" tags (symbols) in all files finder mapping
|
||||
nmap <leader>G :Tags<CR>
|
||||
" general code finder in current file mapping
|
||||
nmap <leader>f :BLines<CR>
|
||||
" general code finder in all files mapping
|
||||
nmap <leader>F :Lines<CR>
|
||||
" commands finder mapping
|
||||
nmap <leader>c :Commands<CR>
|
||||
|
||||
|
||||
" Signify ------------------------------
|
||||
" this first setting decides in which order try to guess your current vcs
|
||||
" UPDATE it to reflect your preferences, it will speed up opening files
|
||||
let g:signify_vcs_list = [ 'git', 'hg' ]
|
||||
" mappings to jump to changed blocks
|
||||
nmap <leader>sn <plug>(signify-next-hunk)
|
||||
nmap <leader>sp <plug>(signify-prev-hunk)
|
||||
|
||||
" nicer colors
|
||||
highlight DiffAdd cterm=bold ctermbg=none ctermfg=119
|
||||
highlight DiffDelete cterm=bold ctermbg=none ctermfg=167
|
||||
highlight DiffChange cterm=bold ctermbg=none ctermfg=227
|
||||
highlight SignifySignAdd cterm=bold ctermbg=237 ctermfg=119
|
||||
highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167
|
||||
highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227
|
||||
|
||||
" Autoclose ------------------------------
|
||||
" Fix to let ESC work as espected with Autoclose plugin
|
||||
" (without this, when showing an autocompletion window, ESC won't leave insert
|
||||
" mode)
|
||||
|
||||
let g:AutoClosePumvisible = {"ENTER": "\<C-Y>", "ESC": "\<ESC>"}
|
||||
let g:AutoClosePairs = "() {} [] ' ` \" "
|
||||
|
||||
" This is solves a bug in devicons that appears when sourcing vimrc
|
||||
if exists("g:loaded_webdevicons")
|
||||
call webdevicons#refresh()
|
||||
endif
|
||||
|
||||
" Include user's custom nvim configurations
|
||||
if filereadable(expand("~/.config/nvim/custom.vim"))
|
||||
source ~/.config/nvim/custom.vim
|
||||
endif
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/init.vim
|
||||
|
|
@ -0,0 +1 @@
|
|||
library/MattDev_NvimConfig⛺/plugged
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.netrwhist
|
||||
MattDev_NvimConfig/
|
||||
colors
|
||||
localdata
|
||||
|
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
|
@ -1,593 +0,0 @@
|
|||
" _____ _ ___ _
|
||||
" / ___|| | / _ \ | |
|
||||
" \ `--. | |__ __ _ __ __ _ __ / /_\ \ _ __ __| | ___ _ __ ___ ___ _ __
|
||||
" `--. \| '_ \ / _` |\ \ /\ / /| '_ \ | _ || '_ \ / _` | / _ \| '__|/ __| / _ \ | '_ \
|
||||
" /\__/ /| | | || (_| | \ V V / | | | | | | | || | | || (_| || __/| | \__ \| (_) || | | |
|
||||
" \____/ |_| |_| \__,_| \_/\_/ |_| |_| \_| |_/|_| |_| \__,_| \___||_| |___/ \___/ |_| |_|
|
||||
"
|
||||
" _ _ _ _____ __ _ _ _
|
||||
" | | | |(_) / __ \ / _|(_) | | (_)
|
||||
" | | | | _ _ __ ___ | / \/ ___ _ __ | |_ _ __ _ _ _ _ __ __ _ | |_ _ ___ _ __
|
||||
" | | | || || '_ ` _ \ | | / _ \ | '_ \ | _|| | / _` || | | || '__| / _` || __|| | / _ \ | '_ \
|
||||
" \ \_/ /| || | | | | | | \__/\| (_) || | | || | | || (_| || |_| || | | (_| || |_ | || (_) || | | |
|
||||
" Neo \___/ |_||_| |_| |_| \____/ \___/ |_| |_||_| |_| \__, | \__,_||_| \__,_| \__||_| \___/ |_| |_|
|
||||
" __/ |
|
||||
" |___/
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Originally a fork of:
|
||||
" https://github.com/novln/nvim/blob/master/init.vim
|
||||
"
|
||||
" Key shortcuts
|
||||
" <C-p> -> ctrl-p
|
||||
" <C-n> -> nerdtree toggle
|
||||
" ...
|
||||
"
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
"
|
||||
" First and foremost, set the cache directory. This is needed to coordinate
|
||||
" plugins.
|
||||
"
|
||||
let b:cache_directory = $HOME . '/.cache/nvim'
|
||||
"
|
||||
" Plugins are the beauty of vim! Use the awesome plugged plugin manager in
|
||||
" neovim.
|
||||
"
|
||||
call plug#begin('~/.local/share/nvim/plugged')
|
||||
"
|
||||
" Plugins are in ascending chronological order relative to when they were
|
||||
" added to the configuration.
|
||||
"
|
||||
"
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Plug 'junegunn/vim-emoji'
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Add words in visible tmux panes to vims completefunc
|
||||
Plug 'wellle/tmux-complete.vim'
|
||||
"
|
||||
" FZF Fuzzy Finder! Careful, things are about to get FAAAAASSSTTT
|
||||
"
|
||||
" A command line fuzzy finder Very powerful
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'airblade/vim-rooter'
|
||||
"
|
||||
"
|
||||
" This command tells fzf to skip filenames during its :Rg search command.
|
||||
"
|
||||
command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".shellescape(<q-args>), 1, {'options': '--delimiter : --nth 4..'}, <bang>0)
|
||||
"
|
||||
"
|
||||
" Images in vim! Using NeoVim, FZF and termpix.
|
||||
"
|
||||
" Original inspiration: to preview image files: https://www.youtube.com/watch?v=vzWibjhLBUs
|
||||
" See gist here: https://gist.github.com/LinuxIsCool/457658f5298e4186f23f3731324b68cb
|
||||
"
|
||||
let g:fzf_layout = { 'down': '~60%' }
|
||||
let g:fzf_files_options =
|
||||
\ '--preview "(~/.cargo/bin/termpix --width 50 --true-color {} || cat {}) 2> /dev/null "'
|
||||
|
||||
" Map ctrl-t to bring up fzf fuzzy finder for files
|
||||
noremap <silent> <C-t> :Files<CR>
|
||||
"
|
||||
" Vim Minimap!
|
||||
" Very cool concept but it's causing a bit of lag, and it raises an error when
|
||||
" I open it. I very well could take a look at the code. I could probably fix
|
||||
" that bug and also increase the performance.
|
||||
" Also, it would need a way to be controlled, like I need to access that
|
||||
" window. It seems like that's actually what's bugging out.
|
||||
" I should probably get back to work. I can probably leave it installed for
|
||||
" now, and not use to too often. I'll take a look at the source too.
|
||||
Plug 'lleixat/vim-minimap'
|
||||
let g:minimap_show='<leader>mm'
|
||||
let g:minimap_close='<leader>mc'
|
||||
let g:minimap_update='<leader>mu'
|
||||
let g:minimap_toggle='<leader>mt'
|
||||
" This one seems sketch as well ..
|
||||
" Plug 'koron/minimap-vim'
|
||||
" No minimap for now. Sept 2020
|
||||
" Although, I couls see how the minimap could be super useful. Let's take
|
||||
" a look at the code of the original python one.
|
||||
|
||||
" Get the dot operator (repeat) functional on plugin commands
|
||||
Plug 'tpope/vim-repeat'
|
||||
" A collection of symetric commands shortcuts the use [ and ] as access keys.
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
|
||||
" This one has a lot of potential. 95 contributors on github, and it's 83%
|
||||
" python
|
||||
Plug 'Shougo/denite.nvim'
|
||||
|
||||
" ES2015 code snippets (Optional)
|
||||
" Plug 'epilande/vim-es2015-snippets'
|
||||
|
||||
" React code snippets
|
||||
" Plug 'epilande/vim-react-snippets'
|
||||
|
||||
" Ultisnips
|
||||
" Plug 'SirVer/ultisnips'
|
||||
|
||||
" Snippets are separated from the engine. Add this if you want them:
|
||||
" Plug 'honza/vim-snippets'
|
||||
|
||||
" Plug 'dsznajder/vscode-es7-javascript-react-snippets', {
|
||||
" \ 'do': 'yarn install --frozen-lockfile && yarn compile' }
|
||||
|
||||
" Trigger configuration (Optional)
|
||||
" let g:UltiSnipsExpandTrigger="<C-l>"
|
||||
"
|
||||
" Vimagit inspired by magit for emacs
|
||||
Plug 'jreybert/vimagit'
|
||||
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
let g:AutoPairsFlyMode = 1
|
||||
au FileType html let b:AutoPairs = AutoPairsDefine({'<!--' : '-->'}, [])
|
||||
au FileType vim let b:AutoPairs = AutoPairsDefine({}, ['"'])
|
||||
|
||||
Plug 'alvan/vim-closetag'
|
||||
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.js'
|
||||
|
||||
" Polyglot language pack
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" Show indentation level
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" NeoMake
|
||||
Plug 'neomake/neomake'
|
||||
|
||||
" COC
|
||||
" Javascript configuration from: https://thoughtbot.com/blog/modern-typescript-and-react-development-in-vim
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
let g:coc_global_extensions = [
|
||||
\ 'coc-tsserver'
|
||||
\ ]
|
||||
" if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
|
||||
" let g:coc_global_extensions += ['coc-prettier']
|
||||
" endif
|
||||
|
||||
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
|
||||
let g:coc_global_extensions += ['coc-eslint']
|
||||
endif
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
nmap <leader>do <Plug>(coc-codeaction)
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
Plug 'neoclide/coc-eslint'
|
||||
Plug 'neoclide/coc-prettier'
|
||||
|
||||
" Automatically generate ctags for files
|
||||
Plug 'xolox/vim-easytags'
|
||||
|
||||
" Language Server Protocol
|
||||
" View and search Language Server Protocol symbols and tags
|
||||
Plug 'liuchengxu/vista.vim'
|
||||
|
||||
" Goyo for distraction free editing! And T-shirts!
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
" Limelight for focused editing
|
||||
Plug 'junegunn/limelight.vim'
|
||||
|
||||
" Make sure you use single quotes
|
||||
"
|
||||
Plug 'tomlion/vim-solidity'
|
||||
"Jupyter Support for VIM
|
||||
" Plug 'szymonmaszke/vimpyter'
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>b :VimpyterInsertPythonBlock<CR>
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>i :VimpyterStartJupyter<CR>
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>n :VimpyterStartNteract<CR>
|
||||
Plug 'jeffkreeftmeijer/vim-numbertoggle'
|
||||
Plug 'tpope/vim-surround'
|
||||
"-------------------------------------------------------------------------------
|
||||
"Color Theme
|
||||
Plug 'tomasiser/vim-code-dark'
|
||||
Plug 'ajmwagar/vim-deus'
|
||||
Plug 'arcticicestudio/nord-vim'
|
||||
"-------------------------------------------------------------------------------
|
||||
Plug 'jceb/vim-orgmode'
|
||||
Plug 'tpope/vim-speeddating'
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Git Section
|
||||
"
|
||||
" Github dashboard in vim!
|
||||
Plug 'junegunn/vim-github-dashboard'
|
||||
|
||||
" Git commands in vim
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" A git commit browser.
|
||||
Plug 'junegunn/gv.vim'
|
||||
|
||||
" Show git diff in the sign column
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Plug 'tpope/vim-rhubarb'
|
||||
|
||||
"---------------
|
||||
" For Javascript and Typescript
|
||||
" INVESTIGATE THESE
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
Plug 'peitalin/vim-jsx-typescript'
|
||||
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
|
||||
Plug 'jparise/vim-graphql'
|
||||
Plug 'yuezk/vim-js'
|
||||
Plug 'maxmellon/vim-jsx-pretty'
|
||||
|
||||
" Start interactive EasyAlign in visual mode (e.g. vipga)
|
||||
xmap ga <Plug>(EasyAlign)
|
||||
|
||||
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Trying out vim lightline as an alternative to vim-airline, sticking with
|
||||
" airline.
|
||||
" Plug 'itchyny/lightline.vim'
|
||||
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
"Enable tabline extension
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#left_sep = '|'
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
let g:airline#extensions#tabline#formatter = 'unique_tail'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Markdown Composer
|
||||
function! BuildComposer(info)
|
||||
if a:info.status != 'unchanged' || a:info.force
|
||||
if has('nvim')
|
||||
!cargo build --release
|
||||
else
|
||||
!cargo build --release --no-default-features --features json-rpc
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
"
|
||||
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }
|
||||
let g:markdown_composer_open_browser = 0
|
||||
"-------------------------------------------------------------------------------
|
||||
"
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,__pycache__/ " MacOSX/Linux<Paste>
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
"The below 4 lines are for speed!from https://stackoverflow.com/questions/21346068/slow-performance-on-ctrlp-it-doesnt-work-to-ignore-some-folders/22784889#22784889
|
||||
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
|
||||
if executable('ag')
|
||||
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
||||
endif
|
||||
let g:ctrlp_cmd = 'CtrlPMixed' " search anything (in files, buffers and MRU files at the same time.)
|
||||
let g:ctrlp_working_path_mode = '' " search for nearest ancestor like .git, .hg, and the directory of the current file
|
||||
let g:ctrlp_match_window_bottom = 1 " show the match window at the top of the screen
|
||||
let g:ctrlp_by_filename = 0
|
||||
let g:ctrlp_max_height = 10 " maximum height of match window
|
||||
let g:ctrlp_switch_buffer = 'et' " jump to a file if it's open already
|
||||
let g:ctrlp_use_caching = 1 " enable caching
|
||||
let g:ctrlp_cache_dir = b:cache_directory . '/ctrlp' " define cache path
|
||||
let g:ctrlp_clear_cache_on_exit = 0 " speed up by not removing clearing cache everytime
|
||||
let g:ctrlp_mruf_max = 250 " number of recently opened files
|
||||
let g:ctrlp_show_hidden = 1
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'py': '__pycache__/',
|
||||
\ }
|
||||
" \'py':__pycache__/'
|
||||
" 'bin'
|
||||
" 'develop-eggs',
|
||||
" 'eggs'
|
||||
" 'parts'
|
||||
" 'src/*.egg-info'
|
||||
" set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
"Comment manager
|
||||
" Allow commenting and inverting empty lines (useful when commenting a region)
|
||||
let g:NERDCommentEmptyLines = 1
|
||||
" Enable trimming of trailing whitespace when uncommenting
|
||||
let g:NERDTrimTrailingWhitespace = 1
|
||||
" Add spaces after comment delimiters by default
|
||||
let g:NERDSpaceDelims = 1
|
||||
" Align line-wise comment delimiters flush left instead of following code indentation
|
||||
let g:NERDDefaultAlign = 'left'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'goerz/ipynb_notedown.vim'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Modified vim start screen
|
||||
Plug 'mhinz/vim-startify'
|
||||
|
||||
Plug 'preservim/nerdtree' |
|
||||
\ Plug 'Xuyuanp/nerdtree-git-plugin' |
|
||||
\ Plug 'ryanoasis/vim-devicons'
|
||||
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
||||
\ 'Modified' :'✹',
|
||||
\ 'Staged' :'✚',
|
||||
\ 'Untracked' :'✭',
|
||||
\ 'Renamed' :'➜',
|
||||
\ 'Unmerged' :'═',
|
||||
\ 'Deleted' :'✖',
|
||||
\ 'Dirty' :'✗',
|
||||
\ 'Ignored' :'☒',
|
||||
\ 'Clean' :'✔︎',
|
||||
\ 'Unknown' :'?',
|
||||
\ }
|
||||
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
|
||||
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " On-demand loading
|
||||
":help NERDTreeOptions
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <leader>r :NERDTreeFind<cr>
|
||||
let NERDTreeIgnore=['\.pyc$', '\~$']
|
||||
|
||||
" This makes the location of the current open file always the current working
|
||||
" directory of vim. Experimental - Sept 15th 2020
|
||||
autocmd BufEnter * lcd %:p:h
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'bfredl/nvim-ipy'
|
||||
let g:nvim_ipy_perform_mappings = 0
|
||||
map <silent> <leader>s <Plug>(IPy-Run)
|
||||
map <silent> <leader><Enter> <Plug>(IPy-RunCell)
|
||||
map <silent> <c-s> <Plug>(IPy-Complete)
|
||||
map <silent> <c-s> <Plug>(IPy-WordObjInfo)
|
||||
map <silent> <leader>? <Plug>(IPy-Interrupt)
|
||||
map <silent> <c-s> <Plug>(IPy-Terminate)
|
||||
|
||||
""---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Fix for slimux:
|
||||
set shell=/bin/sh
|
||||
Plug 'lotabout/slimux'
|
||||
"Send text between tmux panes!
|
||||
nmap <Leader>s :SlimuxREPLSendLine<CR>j
|
||||
vmap <Leader>s :SlimuxREPLSendSelection<CR>
|
||||
" map <C-c><C-c> :SlimuxREPLConfigure<CR>
|
||||
let g:slimux_pane_format = "#W #P "
|
||||
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Plug 'vimwiki/vimwiki'
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
syntax on
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
" DVC
|
||||
autocmd! BufNewFile,BufRead Dvcfile,*.dvc,dvc.lock setfiletype yaml
|
||||
|
||||
"============u============u============u============u============u============u
|
||||
" VIM BEHAVIOUR - Settings
|
||||
" Highlight character at column 80
|
||||
:set colorcolumn=80
|
||||
|
||||
" Tab completion in command mode
|
||||
set wildmenu
|
||||
|
||||
"These filetypes are ignored when expanding wildcard searches
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc
|
||||
|
||||
" show line numbers
|
||||
set number
|
||||
|
||||
" using only 1 column (and 1 space) while possible
|
||||
set numberwidth=1
|
||||
|
||||
" Set vim system timeouts
|
||||
set timeoutlen=1000
|
||||
set ttimeoutlen=5
|
||||
|
||||
" Set numbers relative or
|
||||
" set relativenumber
|
||||
set norelativenumber
|
||||
|
||||
" Vim Arithmetic
|
||||
" <C-c> -> increase the count of a number
|
||||
" <C-x> -> decrease the count of a number
|
||||
nnoremap <C-c> :exe "normal \<C-a>"<CR>
|
||||
|
||||
" Vim date key
|
||||
" I would like this to put behind the cursor.
|
||||
" nnoremap <leader>d :r !date<CR>
|
||||
|
||||
" Vim ls key
|
||||
" Wed 16 Sep 2020 09:32:44 PM PDT
|
||||
nnoremap <leader>l :r ! ls<CR>
|
||||
|
||||
" Here we map the leader key! This is where things get spicy! The leader key
|
||||
" in vim is extremely powerful. Wielded by great mages, it unlocks the ability
|
||||
" to cast spells through one's very own fingertips by merely thinking a string
|
||||
" of words. Once the energetic vibration of these thoughts pass through the
|
||||
" keys into the keyboard, the spell is activated and it's consequences take
|
||||
" effect. Use this key in normal mode to run commands through key bindings!
|
||||
" * Why do we define it twice? Once with no g, then with a g, what is the
|
||||
" difference?
|
||||
"
|
||||
" Set the leader key - #setleader
|
||||
let mapleader=","
|
||||
let g:mapleader=","
|
||||
|
||||
" I was about to make something bad ass here. It escapes me. It was something
|
||||
" about doing something in vim.
|
||||
|
||||
" Here I make <b>shortcuts</b> to various system locations.
|
||||
" ssh config, fish config, vim config, my personal notes,
|
||||
nnoremap <leader>ev :e $MYVIMRC<CR>
|
||||
nnoremap <leader>ef :e ~/.config/fish/config.fish<CR>
|
||||
nnoremap <leader>et :e ~/.tmux.conf<CR>
|
||||
nnoremap <leader>es :e ~/.ssh/config<CR>
|
||||
nnoremap <leader>ed :e ~/Workspace/dotfiles/<CR>
|
||||
nnoremap <leader>ew :e ~/Workspace/<CR>
|
||||
" let current_week "=strftime('%V')
|
||||
" nnoremap <leader>en :e ~/Notes/strftime('%V')/strftime('%V').md<CR>G
|
||||
function Edit()
|
||||
let n = '~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
edit(n)
|
||||
endfunction
|
||||
|
||||
function! Edit()
|
||||
let n = '~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
execute "e ".fnameescape(n)
|
||||
endfunction
|
||||
|
||||
" nnoremap <leader>en :Edit()
|
||||
" nnoremap <leader>en :ex "e ".fnameescape('~/Notes/'.=strftime('%V').'/'.=strftime('%V').'.md')<CR>
|
||||
nnoremap <leader>en "='~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
|
||||
|
||||
nnoremap <leader>en :e strftime('%V')
|
||||
|
||||
" Date utilities
|
||||
:nnoremap <F5> "=strftime("%c")<CR>P
|
||||
:inoremap <F5> <C-R>=strftime("%c")<CR>
|
||||
|
||||
" funct! Exec(command)
|
||||
" redir =>output
|
||||
" silent exec a:command
|
||||
" redir END
|
||||
" return output
|
||||
" endfunct!
|
||||
|
||||
nnoremap <leader><leader> i^R=Exec('ls')
|
||||
|
||||
" Force reload vimrc
|
||||
nnoremap <leader>rv :source $MYVIMRC<CR>
|
||||
" stow -v -R dotfiles -t ~/
|
||||
|
||||
" For copying text out of VIM
|
||||
set mouse=a
|
||||
|
||||
" Syntax Highlighting
|
||||
syntax enable
|
||||
|
||||
" set background=dark
|
||||
"colorscheme solarized
|
||||
set t_Co=256
|
||||
set t_ut=
|
||||
colorscheme nord
|
||||
" colorscheme iceberg
|
||||
" colorscheme codedark
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
" colors deus
|
||||
|
||||
"Highlight Cursor line
|
||||
set cursorline
|
||||
" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"
|
||||
" Enable Intuitive copy and paste
|
||||
" vnoremap <C-c> "*y
|
||||
" vnoremap <C-c> "+y
|
||||
" nnoremap <C-v> "+p
|
||||
" inoremap <C-v> <C-r>+
|
||||
set pastetoggle=<F2>
|
||||
|
||||
"Use modifier to jump to beginning and end of lines
|
||||
map <leader>j $
|
||||
map <leader>f 0
|
||||
|
||||
" This keeps the cursor at the center of the screen.
|
||||
set scrolloff=999
|
||||
|
||||
"split more naturally
|
||||
set splitbelow
|
||||
set splitright
|
||||
" Searching
|
||||
set incsearch " show 'best match so far' as you type
|
||||
set hlsearch " hilight the items found by the search
|
||||
set ignorecase " ignores case of letters on searches
|
||||
set smartcase " Override the 'ignorecase' option if the search pattern contains upper case characters
|
||||
"Manually turn off the search highlight
|
||||
map <leader>/ :nohl<CR>
|
||||
|
||||
set nowrap
|
||||
|
||||
"Abbreviations
|
||||
ab h1 hi
|
||||
|
||||
" Disable these mappings that I don't want.
|
||||
" Hmm.. Better look into this. I should know what these do.
|
||||
noremap <silent> <C-c> <Nop>
|
||||
noremap <silent> <C-w>f <Nop>
|
||||
noremap <silent> <Del> <Nop>
|
||||
noremap <silent> <F1> <Nop>
|
||||
|
||||
" Make buffer movement similar to vimium/vimfx for firefox using let
|
||||
" g:airline#extensions#tabline#enabled v 1
|
||||
"
|
||||
" Cycle tabs
|
||||
" Don't fuckin save, it makes things slow, wish I changed this
|
||||
" earlier...(removing save - Sept 12 2020)
|
||||
" I've been mixing up the terminology of tabs and windows.
|
||||
" A Buffer is what's drawn on the screen
|
||||
" A window is a view of particular text
|
||||
" A tab page is a utility for organizing multiple windows
|
||||
nnoremap <silent> <S-k> :bn<CR>:NERDTreeFind<CR><C-w>l
|
||||
nnoremap <silent> <S-j> :bp<CR>:NERDTreeFind<CR><C-w>l
|
||||
" noremap <C-t> :tabnew split<CR>
|
||||
" Let's shuffle windows just as easy. Then we can get into nerd tree smoother
|
||||
" Whatabout shift n and shift p to cycle tabs?
|
||||
" What do shipt p and shift n do?
|
||||
" shift p is print behind, and shift n is previous search result.
|
||||
" OK, we are not changing the above, they actually match vimium in firefox
|
||||
" Fix Cycle tabs
|
||||
" nnoremap <silent> <S-j> <S-l>
|
||||
" nnoremap <silent> <S-l> :w<CR>:bp<CR>
|
||||
"
|
||||
" nnoremap <silent> <S-k> <S-h>
|
||||
" nnoremap <silent> <S-l> :w<CR>:bn<CR>
|
||||
|
||||
" Tab spacing on html
|
||||
autocmd Filetype html setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype djangohtml setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype css setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype scss setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype javascript setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype json setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype cpp setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype c setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype sh setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype fish setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype bash setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype perl setlocal ts=2 sw=2 expandtab
|
||||
|
||||
"Maintain cursor and window position when switching buffers
|
||||
if v:version >= 700
|
||||
au BufLeave * let b:winview = winsaveview()
|
||||
au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif
|
||||
endif
|
||||
|
||||
" For COC
|
||||
if filereadable(expand("~/.config/nvim/coc.vim"))
|
||||
source ~/.config/nvim/coc.vim
|
||||
endif
|
||||
" " `--. `|/ _\` ( _/-" /
|
||||
" |\_b_9-"" ___) -"-"//'
|
||||
" | --/`--_o"_/' (6_//
|
||||
" P I C C O L O / ,' -"" .),-'
|
||||
" ( "-__ `-(
|
||||
" \ |HHH/ / \
|
||||
" \ - _./ `-._..._
|
||||
" 7----",'/ ..-" .-- "--.._
|
||||
" _.._.-/) .-',/ .-" -" ""--..
|
||||
" _..--"|=""--..--""""""./' . .-"""-.\
|
||||
" ,' .-',' ,' /. / .' \\
|
||||
" .:' ,' ,: / ,/'/ /' _....' _..--""" )
|
||||
" ,"/ / /( / _,/' / ,/' /. .-" __|
|
||||
" / / /' ( ""----"""" / ,/ / `:.-" _.--"" /
|
||||
" || ( \_ __.-' / |`-.`:=._-" _.-:|
|
||||
" \/ \ """"""" / ""-` `-"===="-' \
|
||||
" | "-. __..-" \._.====.. `
|
||||
" | ""--"""" //..---""\\ .
|
||||
" \ /'| __...---.\ |
|
||||
"
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"coc.preferences.formatOnSaveFiletypes": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact"
|
||||
],
|
||||
"tsserver.formatOnType": true,
|
||||
"coc.preferences.formatOnType": true,
|
||||
"eslint.autoFixOnSave": true,
|
||||
"eslint.filetypes": ["javascript", "javascriptreact", "typescript", "typescriptreact"]
|
||||
}
|
||||
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
" TextEdit might fail if hidden is not set.
|
||||
set hidden
|
||||
|
||||
" Some servers have issues with backup files, see #649.
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
|
||||
" Give more space for displaying messages.
|
||||
set cmdheight=2
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("patch-8.1.1564")
|
||||
" Recently vim can merge signcolumn and number column into one
|
||||
set signcolumn=number
|
||||
else
|
||||
set signcolumn=yes
|
||||
endif
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current
|
||||
" position. Coc only does snippet and additional edit on confirm.
|
||||
" <cr> could be remapped by other vim plugin, try `:verbose imap <CR>`.
|
||||
if exists('*complete_info')
|
||||
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
else
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
endif
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
" nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
"
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Formatting selected code.
|
||||
" xmap <leader>f <Plug>(coc-format-selected)
|
||||
" nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder.
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap keys for applying codeAction to the current buffer.
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Apply AutoFix to problem on the current line.
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
" Map function and class text objects
|
||||
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
xmap ic <Plug>(coc-classobj-i)
|
||||
omap ic <Plug>(coc-classobj-i)
|
||||
xmap ac <Plug>(coc-classobj-a)
|
||||
omap ac <Plug>(coc-classobj-a)
|
||||
|
||||
" Use CTRL-S for selections ranges.
|
||||
" Requires 'textDocument/selectionRange' support of LS, ex: coc-tsserver
|
||||
nmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-s> <Plug>(coc-range-select)
|
||||
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Add `:Fold` command to fold current buffer.
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" Add `:OR` command for organize imports of the current buffer.
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||
|
||||
" Add (Neo)Vim's native statusline support.
|
||||
" NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||
" provide custom statusline: lightline.vim, vim-airline.
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
|
||||
" Mappings for CoCList
|
||||
" Show all diagnostics.
|
||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions.
|
||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands.
|
||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document.
|
||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols.
|
||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list.
|
||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||
|
|
@ -1,615 +0,0 @@
|
|||
" _____ _ ___ _
|
||||
" / ___|| | / _ \ | |
|
||||
" \ `--. | |__ __ _ __ __ _ __ / /_\ \ _ __ __| | ___ _ __ ___ ___ _ __
|
||||
" `--. \| '_ \ / _` |\ \ /\ / /| '_ \ | _ || '_ \ / _` | / _ \| '__|/ __| / _ \ | '_ \
|
||||
" /\__/ /| | | || (_| | \ V V / | | | | | | | || | | || (_| || __/| | \__ \| (_) || | | |
|
||||
" \____/ |_| |_| \__,_| \_/\_/ |_| |_| \_| |_/|_| |_| \__,_| \___||_| |___/ \___/ |_| |_|
|
||||
"
|
||||
" _ _ _ _____ __ _ _ _
|
||||
" | | | |(_) / __ \ / _|(_) | | (_)
|
||||
" | | | | _ _ __ ___ | / \/ ___ _ __ | |_ _ __ _ _ _ _ __ __ _ | |_ _ ___ _ __
|
||||
" | | | || || '_ ` _ \ | | / _ \ | '_ \ | _|| | / _` || | | || '__| / _` || __|| | / _ \ | '_ \
|
||||
" \ \_/ /| || | | | | | | \__/\| (_) || | | || | | || (_| || |_| || | | (_| || |_ | || (_) || | | |
|
||||
" Neo \___/ |_||_| |_| |_| \____/ \___/ |_| |_||_| |_| \__, | \__,_||_| \__,_| \__||_| \___/ |_| |_|
|
||||
" __/ |
|
||||
" |___/
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Originally a fork of:
|
||||
" https://github.com/novln/nvim/blob/master/init.vim
|
||||
"
|
||||
" Key shortcuts
|
||||
" <C-p> -> ctrl-p
|
||||
" <C-n> -> nerdtree toggle
|
||||
" ...
|
||||
"
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
"
|
||||
" First and foremost, set the cache directory. This is needed to coordinate
|
||||
" plugins.
|
||||
"
|
||||
let b:cache_directory = $HOME . '/.cache/nvim'
|
||||
"
|
||||
" Plugins are the beauty of vim! Use the awesome plugged plugin manager in
|
||||
" neovim.
|
||||
"
|
||||
call plug#begin('~/.local/share/nvim/plugged')
|
||||
"
|
||||
" Plugins are in ascending chronological order relative to when they were
|
||||
" added to the configuration.
|
||||
"
|
||||
Plug 'junegunn/rainbow_parentheses.vim'
|
||||
Plug 'psliwka/vim-smoothie'
|
||||
Plug 'jez/vim-superman'
|
||||
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Plug 'junegunn/vim-emoji'
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Add words in visible tmux panes to vims completefunc
|
||||
Plug 'wellle/tmux-complete.vim'
|
||||
"
|
||||
" FZF Fuzzy Finder! Careful, things are about to get FAAAAASSSTTT
|
||||
"
|
||||
" A command line fuzzy finder Very powerful
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'yuki-ycino/fzf-preview.vim', { 'branch': 'release', 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'airblade/vim-rooter'
|
||||
"
|
||||
"
|
||||
" This command tells fzf to skip filenames during its :Rg search command.
|
||||
" Why do that? I don't know.. needs experimentation.
|
||||
command! -bang -nargs=* Rg call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".shellescape(<q-args>), 1, {'options': '--delimiter : --nth 4..'}, <bang>0)
|
||||
|
||||
" https://dev.to/iggredible/how-to-search-faster-in-vim-with-fzf-vim-36ko
|
||||
" This overides the vim :grep command
|
||||
set grepprg=rg\ --vimgrep\ --smart-case\ --follow
|
||||
" It allows for search and replace across our entire project with the
|
||||
" following:
|
||||
" :grep "pizza"
|
||||
" :cfdo %s/pizza/donut/g | update
|
||||
" cfdo executes any command we pass on all entries in our quickfix list.
|
||||
"
|
||||
" Video - https://www.youtube.com/watch?v=vzWibjhLBUs
|
||||
" Gist - https://gist.github.com/LinuxIsCool/457658f5298e4186f23f3731324b68cb
|
||||
" Images in vim! Using NeoVim, FZF and termpix.
|
||||
if executable('fish')
|
||||
" use fish for embedded terminals
|
||||
set shell=fish
|
||||
" use bash for else
|
||||
let $SHELL = 'bash'
|
||||
endif
|
||||
let g:fzf_layout = { 'down': '~60%' }
|
||||
let g:fzf_files_options =
|
||||
\ '--preview "(termpix --width 50 {} || bat {}) 2> /dev/null "'
|
||||
|
||||
" Map ctrl-t to bring up fzf fuzzy finder for files
|
||||
noremap <silent> <C-t> :Files<CR>
|
||||
"
|
||||
" Vim Minimap!
|
||||
" Very cool concept but it's causing a bit of lag, and it raises an error when
|
||||
" I open it. I very well could take a look at the code. I could probably fix
|
||||
" that bug and also increase the performance.
|
||||
" Also, it would need a way to be controlled, like I need to access that
|
||||
" window. It seems like that's actually what's bugging out.
|
||||
" I should probably get back to work. I can probably leave it installed for
|
||||
" now, and not use to too often. I'll take a look at the source too.
|
||||
Plug 'lleixat/vim-minimap'
|
||||
let g:minimap_show='<leader>mm'
|
||||
let g:minimap_close='<leader>mc'
|
||||
let g:minimap_update='<leader>mu'
|
||||
let g:minimap_toggle='<leader>mt'
|
||||
" This one seems sketch as well ..
|
||||
" Plug 'koron/minimap-vim'
|
||||
" No minimap for now. Sept 2020
|
||||
" Although, I couls see how the minimap could be super useful. Let's take
|
||||
" a look at the code of the original python one.
|
||||
|
||||
" Get the dot operator (repeat) functional on plugin commands
|
||||
Plug 'tpope/vim-repeat'
|
||||
" A collection of symetric commands shortcuts the use [ and ] as access keys.
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
|
||||
" This one has a lot of potential. 95 contributors on github, and it's 83%
|
||||
" python
|
||||
Plug 'Shougo/denite.nvim'
|
||||
|
||||
" ES2015 code snippets (Optional)
|
||||
" Plug 'epilande/vim-es2015-snippets'
|
||||
|
||||
" React code snippets
|
||||
" Plug 'epilande/vim-react-snippets'
|
||||
|
||||
" Ultisnips
|
||||
" Plug 'SirVer/ultisnips'
|
||||
|
||||
" Snippets are separated from the engine. Add this if you want them:
|
||||
" Plug 'honza/vim-snippets'
|
||||
|
||||
" Plug 'dsznajder/vscode-es7-javascript-react-snippets', {
|
||||
" \ 'do': 'yarn install --frozen-lockfile && yarn compile' }
|
||||
|
||||
" Trigger configuration (Optional)
|
||||
" let g:UltiSnipsExpandTrigger="<C-l>"
|
||||
"
|
||||
" Vimagit inspired by magit for emacs
|
||||
Plug 'jreybert/vimagit'
|
||||
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
let g:AutoPairsFlyMode = 1
|
||||
au FileType html let b:AutoPairs = AutoPairsDefine({'<!--' : '-->'}, [])
|
||||
au FileType vim let b:AutoPairs = AutoPairsDefine({}, ['"'])
|
||||
|
||||
Plug 'alvan/vim-closetag'
|
||||
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.js'
|
||||
|
||||
" Polyglot language pack
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" Show indentation level
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" NeoMake
|
||||
Plug 'neomake/neomake'
|
||||
|
||||
" COC
|
||||
" Javascript configuration from: https://thoughtbot.com/blog/modern-typescript-and-react-development-in-vim
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
let g:coc_global_extensions = [
|
||||
\ 'coc-tsserver'
|
||||
\ ]
|
||||
" if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
|
||||
" let g:coc_global_extensions += ['coc-prettier']
|
||||
" endif
|
||||
|
||||
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
|
||||
let g:coc_global_extensions += ['coc-eslint']
|
||||
endif
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
nmap <leader>do <Plug>(coc-codeaction)
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
Plug 'neoclide/coc-eslint'
|
||||
Plug 'neoclide/coc-prettier'
|
||||
|
||||
" Automatically generate ctags for files
|
||||
Plug 'xolox/vim-easytags'
|
||||
|
||||
" Language Server Protocol
|
||||
" View and search Language Server Protocol symbols and tags
|
||||
Plug 'liuchengxu/vista.vim'
|
||||
|
||||
" Goyo for distraction free editing! And T-shirts!
|
||||
Plug 'junegunn/goyo.vim'
|
||||
|
||||
" Limelight for focused editing
|
||||
Plug 'junegunn/limelight.vim'
|
||||
|
||||
" Make sure you use single quotes
|
||||
"
|
||||
Plug 'tomlion/vim-solidity'
|
||||
"Jupyter Support for VIM
|
||||
" Plug 'szymonmaszke/vimpyter'
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>b :VimpyterInsertPythonBlock<CR>
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>i :VimpyterStartJupyter<CR>
|
||||
" autocmd Filetype ipynb nmap <silent><Leader>n :VimpyterStartNteract<CR>
|
||||
Plug 'jeffkreeftmeijer/vim-numbertoggle'
|
||||
Plug 'tpope/vim-surround'
|
||||
"-------------------------------------------------------------------------------
|
||||
"Color Theme
|
||||
Plug 'tomasiser/vim-code-dark'
|
||||
Plug 'ajmwagar/vim-deus'
|
||||
Plug 'arcticicestudio/nord-vim'
|
||||
"-------------------------------------------------------------------------------
|
||||
Plug 'jceb/vim-orgmode'
|
||||
Plug 'tpope/vim-speeddating'
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Git Section
|
||||
"
|
||||
" Github dashboard in vim!
|
||||
Plug 'junegunn/vim-github-dashboard'
|
||||
|
||||
" Git commands in vim
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" A git commit browser.
|
||||
Plug 'junegunn/gv.vim'
|
||||
|
||||
" Show git diff in the sign column
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Plug 'tpope/vim-rhubarb'
|
||||
|
||||
"---------------
|
||||
" For Javascript and Typescript
|
||||
" INVESTIGATE THESE
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
Plug 'peitalin/vim-jsx-typescript'
|
||||
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
|
||||
Plug 'jparise/vim-graphql'
|
||||
Plug 'yuezk/vim-js'
|
||||
Plug 'maxmellon/vim-jsx-pretty'
|
||||
|
||||
" Start interactive EasyAlign in visual mode (e.g. vipga)
|
||||
xmap ga <Plug>(EasyAlign)
|
||||
|
||||
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Trying out vim lightline as an alternative to vim-airline, sticking with
|
||||
" airline.
|
||||
" Plug 'itchyny/lightline.vim'
|
||||
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
"Enable tabline extension
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#left_sep = '|'
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
let g:airline#extensions#tabline#formatter = 'unique_tail'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Markdown Composer
|
||||
function! BuildComposer(info)
|
||||
if a:info.status != 'unchanged' || a:info.force
|
||||
if has('nvim')
|
||||
!cargo build --release
|
||||
else
|
||||
!cargo build --release --no-default-features --features json-rpc
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
"
|
||||
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') }
|
||||
let g:markdown_composer_open_browser = 0
|
||||
"-------------------------------------------------------------------------------
|
||||
"
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,__pycache__/ " MacOSX/Linux<Paste>
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
"The below 4 lines are for speed!from https://stackoverflow.com/questions/21346068/slow-performance-on-ctrlp-it-doesnt-work-to-ignore-some-folders/22784889#22784889
|
||||
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
|
||||
if executable('ag')
|
||||
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
||||
endif
|
||||
let g:ctrlp_cmd = 'CtrlPMixed' " search anything (in files, buffers and MRU files at the same time.)
|
||||
let g:ctrlp_working_path_mode = '' " search for nearest ancestor like .git, .hg, and the directory of the current file
|
||||
let g:ctrlp_match_window_bottom = 1 " show the match window at the top of the screen
|
||||
let g:ctrlp_by_filename = 0
|
||||
let g:ctrlp_max_height = 10 " maximum height of match window
|
||||
let g:ctrlp_switch_buffer = 'et' " jump to a file if it's open already
|
||||
let g:ctrlp_use_caching = 1 " enable caching
|
||||
let g:ctrlp_cache_dir = b:cache_directory . '/ctrlp' " define cache path
|
||||
let g:ctrlp_clear_cache_on_exit = 0 " speed up by not removing clearing cache everytime
|
||||
let g:ctrlp_mruf_max = 250 " number of recently opened files
|
||||
let g:ctrlp_show_hidden = 1
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'py': '__pycache__/',
|
||||
\ }
|
||||
" \'py':__pycache__/'
|
||||
" 'bin'
|
||||
" 'develop-eggs',
|
||||
" 'eggs'
|
||||
" 'parts'
|
||||
" 'src/*.egg-info'
|
||||
" set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
"Comment manager
|
||||
" Allow commenting and inverting empty lines (useful when commenting a region)
|
||||
let g:NERDCommentEmptyLines = 1
|
||||
" Enable trimming of trailing whitespace when uncommenting
|
||||
let g:NERDTrimTrailingWhitespace = 1
|
||||
" Add spaces after comment delimiters by default
|
||||
let g:NERDSpaceDelims = 1
|
||||
" Align line-wise comment delimiters flush left instead of following code indentation
|
||||
let g:NERDDefaultAlign = 'left'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'goerz/ipynb_notedown.vim'
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Modified vim start screen
|
||||
Plug 'mhinz/vim-startify'
|
||||
|
||||
Plug 'preservim/nerdtree' |
|
||||
\ Plug 'Xuyuanp/nerdtree-git-plugin' |
|
||||
\ Plug 'ryanoasis/vim-devicons'
|
||||
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
||||
\ 'Modified' :'✹',
|
||||
\ 'Staged' :'✚',
|
||||
\ 'Untracked' :'✭',
|
||||
\ 'Renamed' :'➜',
|
||||
\ 'Unmerged' :'═',
|
||||
\ 'Deleted' :'✖',
|
||||
\ 'Dirty' :'✗',
|
||||
\ 'Ignored' :'☒',
|
||||
\ 'Clean' :'✔︎',
|
||||
\ 'Unknown' :'?',
|
||||
\ }
|
||||
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
|
||||
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " On-demand loading
|
||||
":help NERDTreeOptions
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <leader>r :NERDTreeFind<cr>
|
||||
let NERDTreeIgnore=['\.pyc$', '\~$']
|
||||
|
||||
" This makes the location of the current open file always the current working
|
||||
" directory of vim. Experimental - Sept 15th 2020
|
||||
autocmd BufEnter * lcd %:p:h
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
Plug 'bfredl/nvim-ipy'
|
||||
let g:nvim_ipy_perform_mappings = 0
|
||||
map <silent> <leader>s <Plug>(IPy-Run)
|
||||
map <silent> <leader><Enter> <Plug>(IPy-RunCell)
|
||||
map <silent> <c-s> <Plug>(IPy-Complete)
|
||||
map <silent> <c-s> <Plug>(IPy-WordObjInfo)
|
||||
map <silent> <leader>? <Plug>(IPy-Interrupt)
|
||||
map <silent> <c-s> <Plug>(IPy-Terminate)
|
||||
|
||||
""---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
" Fix for slimux:
|
||||
set shell=/bin/sh
|
||||
Plug 'lotabout/slimux'
|
||||
"Send text between tmux panes!
|
||||
nmap <Leader>s :SlimuxREPLSendLine<CR>j
|
||||
vmap <Leader>s :SlimuxREPLSendSelection<CR>
|
||||
" map <C-c><C-c> :SlimuxREPLConfigure<CR>
|
||||
let g:slimux_pane_format = "#W #P "
|
||||
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Plug 'vimwiki/vimwiki'
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
syntax on
|
||||
"---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
" DVC
|
||||
autocmd! BufNewFile,BufRead Dvcfile,*.dvc,dvc.lock setfiletype yaml
|
||||
|
||||
"============u============u============u============u============u============u
|
||||
" VIM BEHAVIOUR - Settings
|
||||
" Highlight character at column 80
|
||||
:set colorcolumn=80
|
||||
|
||||
" Tab completion in command mode
|
||||
set wildmenu
|
||||
|
||||
"These filetypes are ignored when expanding wildcard searches
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc
|
||||
|
||||
" show line numbers
|
||||
set number
|
||||
|
||||
" using only 1 column (and 1 space) while possible
|
||||
set numberwidth=1
|
||||
|
||||
" Set vim system timeouts
|
||||
set timeoutlen=1000
|
||||
set ttimeoutlen=5
|
||||
|
||||
" Set numbers relative or
|
||||
set relativenumber
|
||||
" set norelativenumber
|
||||
|
||||
" Vim Arithmetic
|
||||
" <C-c> -> increase the count of a number
|
||||
" <C-x> -> decrease the count of a number
|
||||
nnoremap <C-c> :exe "normal \<C-a>"<CR>
|
||||
|
||||
" Vim date key
|
||||
" I would like this to put behind the cursor.
|
||||
" nnoremap <leader>d :r !date<CR>
|
||||
|
||||
" Vim ls key
|
||||
" Wed 16 Sep 2020 09:32:44 PM PDT
|
||||
nnoremap <leader>l :r ! ls<CR>
|
||||
|
||||
" Here we map the leader key! This is where things get spicy! The leader key
|
||||
" in vim is extremely powerful. Wielded by great mages, it unlocks the ability
|
||||
" to cast spells through one's very own fingertips by merely thinking a string
|
||||
" of words. Once the energetic vibration of these thoughts pass through the
|
||||
" keys into the keyboard, the spell is activated and it's consequences take
|
||||
" effect. Use this key in normal mode to run commands through key bindings!
|
||||
" * Why do we define it twice? Once with no g, then with a g, what is the
|
||||
" difference?
|
||||
"
|
||||
" Set the leader key - #setleader
|
||||
let mapleader=","
|
||||
let g:mapleader=","
|
||||
|
||||
" I was about to make something bad ass here. It escapes me. It was something
|
||||
" about doing something in vim.
|
||||
|
||||
" Here I make <b>shortcuts</b> to various system locations.
|
||||
" ssh config, fish config, vim config, my personal notes,
|
||||
nnoremap <leader>ev :e $MYVIMRC<CR>
|
||||
nnoremap <leader>ef :e ~/.config/fish/config.fish<CR>
|
||||
nnoremap <leader>et :e ~/.tmux.conf<CR>
|
||||
nnoremap <leader>es :e ~/.ssh/config<CR>
|
||||
nnoremap <leader>ed :e ~/Workspace/dotfiles/<CR>
|
||||
nnoremap <leader>ew :e ~/Workspace/<CR>
|
||||
" let current_week "=strftime('%V')
|
||||
" nnoremap <leader>en :e ~/Notes/strftime('%V')/strftime('%V').md<CR>G
|
||||
function Edit()
|
||||
let n = '~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
edit(n)
|
||||
endfunction
|
||||
|
||||
function! Edit()
|
||||
let n = '~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
execute "e ".fnameescape(n)
|
||||
endfunction
|
||||
|
||||
" nnoremap <leader>en :Edit()
|
||||
" nnoremap <leader>en :ex "e ".fnameescape('~/Notes/'.=strftime('%V').'/'.=strftime('%V').'.md')<CR>
|
||||
nnoremap <leader>en "='~/Notes/'.strftime('%V').'/'.strftime('%V').'.md'
|
||||
|
||||
|
||||
nnoremap <leader>en :e strftime('%V')
|
||||
|
||||
" Date utilities
|
||||
:nnoremap <F5> "=strftime("%c")<CR>P
|
||||
:inoremap <F5> <C-R>=strftime("%c")<CR>
|
||||
|
||||
" funct! Exec(command)
|
||||
" redir =>output
|
||||
" silent exec a:command
|
||||
" redir END
|
||||
" return output
|
||||
" endfunct!
|
||||
|
||||
nnoremap <leader><leader> i^R=Exec('ls')
|
||||
|
||||
" Force reload vimrc
|
||||
nnoremap <leader>rv :source $MYVIMRC<CR>
|
||||
" stow -v -R dotfiles -t ~/
|
||||
|
||||
" For copying text out of VIM
|
||||
set mouse=a
|
||||
|
||||
" Syntax Highlighting
|
||||
syntax enable
|
||||
|
||||
" set background=dark
|
||||
"colorscheme solarized
|
||||
set t_Co=256
|
||||
set t_ut=
|
||||
" set t_AB=^[[48;5;%dm
|
||||
" set t_AF=^[[38;5;%dm
|
||||
" let NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
" colorscheme desert-warm-256
|
||||
colorscheme quantum
|
||||
" colorscheme nord
|
||||
" colorscheme iceberg
|
||||
" colorscheme codedark
|
||||
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
" colors deus
|
||||
"Highlight Cursor line
|
||||
set cursorline
|
||||
" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"
|
||||
" Enable Intuitive copy and paste
|
||||
" vnoremap <C-c> "*y
|
||||
" vnoremap <C-c> "+y
|
||||
" nnoremap <C-v> "+p
|
||||
" inoremap <C-v> <C-r>+
|
||||
set pastetoggle=<F2>
|
||||
|
||||
"Use modifier to jump to beginning and end of lines
|
||||
map <leader>j $
|
||||
map <leader>f 0
|
||||
|
||||
" This keeps the cursor at the center of the screen.
|
||||
" set scrolloff=0
|
||||
set scrolloff=999
|
||||
|
||||
"split more naturally
|
||||
set splitbelow
|
||||
set splitright
|
||||
" Searching
|
||||
set incsearch " show 'best match so far' as you type
|
||||
set hlsearch " hilight the items found by the search
|
||||
set ignorecase " ignores case of letters on searches
|
||||
set smartcase " Override the 'ignorecase' option if the search pattern contains upper case characters
|
||||
"Manually turn off the search highlight
|
||||
map <leader>/ :nohl<CR>
|
||||
|
||||
set nowrap
|
||||
|
||||
"Abbreviations
|
||||
ab h1 hi
|
||||
|
||||
" Disable these mappings that I don't want.
|
||||
" Hmm.. Better look into this. I should know what these do.
|
||||
noremap <silent> <C-c> <Nop>
|
||||
noremap <silent> <C-w>f <Nop>
|
||||
noremap <silent> <Del> <Nop>
|
||||
noremap <silent> <F1> <Nop>
|
||||
|
||||
" Make buffer movement similar to vimium/vimfx for firefox using let
|
||||
" g:airline#extensions#tabline#enabled v 1
|
||||
"
|
||||
" Cycle tabs
|
||||
" Don't fuckin save, it makes things slow, wish I changed this
|
||||
" earlier...(removing save - Sept 12 2020)
|
||||
" I've been mixing up the terminology of tabs and windows.
|
||||
" A Buffer is what's drawn on the screen
|
||||
" A window is a view of particular text
|
||||
" A tab page is a utility for organizing multiple windows
|
||||
nnoremap <silent> <S-k> :bn<CR>:NERDTreeFind<CR><C-w>l
|
||||
nnoremap <silent> <S-j> :bp<CR>:NERDTreeFind<CR><C-w>l
|
||||
" noremap <C-t> :tabnew split<CR>
|
||||
" Let's shuffle windows just as easy. Then we can get into nerd tree smoother
|
||||
" Whatabout shift n and shift p to cycle tabs?
|
||||
" What do shipt p and shift n do?
|
||||
" shift p is print behind, and shift n is previous search result.
|
||||
" OK, we are not changing the above, they actually match vimium in firefox
|
||||
" Fix Cycle tabs
|
||||
" nnoremap <silent> <S-j> <S-l>
|
||||
" nnoremap <silent> <S-l> :w<CR>:bp<CR>
|
||||
"
|
||||
" nnoremap <silent> <S-k> <S-h>
|
||||
" nnoremap <silent> <S-l> :w<CR>:bn<CR>
|
||||
|
||||
" Tab spacing on html
|
||||
autocmd Filetype html setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype djangohtml setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype css setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype scss setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype javascript setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype json setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype cpp setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype c setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype sh setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype fish setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype bash setlocal ts=2 sw=2 expandtab
|
||||
autocmd Filetype perl setlocal ts=2 sw=2 expandtab
|
||||
|
||||
"Maintain cursor and window position when switching buffers
|
||||
if v:version >= 700
|
||||
au BufLeave * let b:winview = winsaveview()
|
||||
au BufEnter * if(exists('b:winview')) | call winrestview(b:winview) | endif
|
||||
endif
|
||||
|
||||
" For COC
|
||||
if filereadable(expand("~/.config/nvim/coc.vim"))
|
||||
source ~/.config/nvim/coc.vim
|
||||
endif
|
||||
" " `--. `|/ _\` ( _/-" /
|
||||
" |\_b_9-"" ___) -"-"//'
|
||||
" | --/`--_o"_/' (6_//
|
||||
" P I C C O L O / ,' -"" .),-'
|
||||
" ( "-__ `-(
|
||||
" \ |HHH/ / \
|
||||
" \ - _./ `-._..._
|
||||
" 7----",'/ ..-" .-- "--.._
|
||||
" _.._.-/) .-',/ .-" -" ""--..
|
||||
" _..--"|=""--..--""""""./' . .-"""-.\
|
||||
" ,' .-',' ,' /. / .' \\
|
||||
" .:' ,' ,: / ,/'/ /' _....' _..--""" )
|
||||
" ,"/ / /( / _,/' / ,/' /. .-" __|
|
||||
" / / /' ( ""----"""" / ,/ / `:.-" _.--"" /
|
||||
" || ( \_ __.-' / |`-.`:=._-" _.-:|
|
||||
" \/ \ """"""" / ""-` `-"===="-' \
|
||||
" | "-. __..-" \._.====.. `
|
||||
" | ""--"""" //..---""\\ .
|
||||
" \ /'| __...---.\ |
|
||||
"
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
1601205341.298278 client started (175843): version 3.0a, socket /tmp//tmux-1000/default, protocol 8
|
||||
1601205341.298290 on Linux 5.4.0-7642-generic #46~1598628707~20.04~040157c-Ubuntu SMP Fri Aug 28 18:02:16 UTC ; libevent 2.1.11-stable (poll)
|
||||
1601205341.298296 socket is /tmp//tmux-1000/default
|
||||
1601205341.298304 trying connect
|
||||
1601205341.298329 add peer 0x5582eff8d5e0: 6 ((nil))
|
||||
1601205341.298379 sending message 100 to peer 0x5582eff8d5e0 (4 bytes)
|
||||
1601205341.298382 sending message 101 to peer 0x5582eff8d5e0 (7 bytes)
|
||||
1601205341.298384 sending message 102 to peer 0x5582eff8d5e0 (11 bytes)
|
||||
1601205341.298385 sending message 108 to peer 0x5582eff8d5e0 (60 bytes)
|
||||
1601205341.298387 sending message 104 to peer 0x5582eff8d5e0 (0 bytes)
|
||||
1601205341.298389 sending message 107 to peer 0x5582eff8d5e0 (4 bytes)
|
||||
1601205341.298391 sending message 105 to peer 0x5582eff8d5e0 (63 bytes)
|
||||
1601205341.298392 sending message 105 to peer 0x5582eff8d5e0 (19 bytes)
|
||||
1601205341.298394 sending message 105 to peer 0x5582eff8d5e0 (16 bytes)
|
||||
1601205341.298395 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298397 sending message 105 to peer 0x5582eff8d5e0 (54 bytes)
|
||||
1601205341.298398 sending message 105 to peer 0x5582eff8d5e0 (48 bytes)
|
||||
1601205341.298400 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298401 sending message 105 to peer 0x5582eff8d5e0 (11 bytes)
|
||||
1601205341.298403 sending message 105 to peer 0x5582eff8d5e0 (12 bytes)
|
||||
1601205341.298404 sending message 105 to peer 0x5582eff8d5e0 (15 bytes)
|
||||
1601205341.298406 sending message 105 to peer 0x5582eff8d5e0 (44 bytes)
|
||||
1601205341.298411 sending message 105 to peer 0x5582eff8d5e0 (29 bytes)
|
||||
1601205341.298413 sending message 105 to peer 0x5582eff8d5e0 (86 bytes)
|
||||
1601205341.298415 sending message 105 to peer 0x5582eff8d5e0 (29 bytes)
|
||||
1601205341.298416 sending message 105 to peer 0x5582eff8d5e0 (52 bytes)
|
||||
1601205341.298418 sending message 105 to peer 0x5582eff8d5e0 (47 bytes)
|
||||
1601205341.298435 sending message 105 to peer 0x5582eff8d5e0 (15 bytes)
|
||||
1601205341.298436 sending message 105 to peer 0x5582eff8d5e0 (18 bytes)
|
||||
1601205341.298438 sending message 105 to peer 0x5582eff8d5e0 (47 bytes)
|
||||
1601205341.298439 sending message 105 to peer 0x5582eff8d5e0 (23 bytes)
|
||||
1601205341.298441 sending message 105 to peer 0x5582eff8d5e0 (17 bytes)
|
||||
1601205341.298443 sending message 105 to peer 0x5582eff8d5e0 (18 bytes)
|
||||
1601205341.298444 sending message 105 to peer 0x5582eff8d5e0 (23 bytes)
|
||||
1601205341.298445 sending message 105 to peer 0x5582eff8d5e0 (30 bytes)
|
||||
1601205341.298447 sending message 105 to peer 0x5582eff8d5e0 (27 bytes)
|
||||
1601205341.298448 sending message 105 to peer 0x5582eff8d5e0 (24 bytes)
|
||||
1601205341.298450 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298451 sending message 105 to peer 0x5582eff8d5e0 (23 bytes)
|
||||
1601205341.298453 sending message 105 to peer 0x5582eff8d5e0 (21 bytes)
|
||||
1601205341.298454 sending message 105 to peer 0x5582eff8d5e0 (25 bytes)
|
||||
1601205341.298456 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298457 sending message 105 to peer 0x5582eff8d5e0 (35 bytes)
|
||||
1601205341.298459 sending message 105 to peer 0x5582eff8d5e0 (12 bytes)
|
||||
1601205341.298460 sending message 105 to peer 0x5582eff8d5e0 (16 bytes)
|
||||
1601205341.298462 sending message 105 to peer 0x5582eff8d5e0 (51 bytes)
|
||||
1601205341.298463 sending message 105 to peer 0x5582eff8d5e0 (33 bytes)
|
||||
1601205341.298465 sending message 105 to peer 0x5582eff8d5e0 (36 bytes)
|
||||
1601205341.298466 sending message 105 to peer 0x5582eff8d5e0 (17 bytes)
|
||||
1601205341.298468 sending message 105 to peer 0x5582eff8d5e0 (17 bytes)
|
||||
1601205341.298469 sending message 105 to peer 0x5582eff8d5e0 (387 bytes)
|
||||
1601205341.298471 sending message 105 to peer 0x5582eff8d5e0 (64 bytes)
|
||||
1601205341.298473 sending message 105 to peer 0x5582eff8d5e0 (19 bytes)
|
||||
1601205341.298474 sending message 105 to peer 0x5582eff8d5e0 (18 bytes)
|
||||
1601205341.298476 sending message 105 to peer 0x5582eff8d5e0 (15 bytes)
|
||||
1601205341.298477 sending message 105 to peer 0x5582eff8d5e0 (82 bytes)
|
||||
1601205341.298479 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298484 sending message 105 to peer 0x5582eff8d5e0 (8 bytes)
|
||||
1601205341.298485 sending message 105 to peer 0x5582eff8d5e0 (19 bytes)
|
||||
1601205341.298487 sending message 105 to peer 0x5582eff8d5e0 (41 bytes)
|
||||
1601205341.298488 sending message 105 to peer 0x5582eff8d5e0 (12 bytes)
|
||||
1601205341.298490 sending message 105 to peer 0x5582eff8d5e0 (24 bytes)
|
||||
1601205341.298491 sending message 105 to peer 0x5582eff8d5e0 (36 bytes)
|
||||
1601205341.298493 sending message 105 to peer 0x5582eff8d5e0 (14 bytes)
|
||||
1601205341.298494 sending message 105 to peer 0x5582eff8d5e0 (9 bytes)
|
||||
1601205341.298496 sending message 105 to peer 0x5582eff8d5e0 (13 bytes)
|
||||
1601205341.298498 sending message 105 to peer 0x5582eff8d5e0 (17 bytes)
|
||||
1601205341.298499 sending message 105 to peer 0x5582eff8d5e0 (13 bytes)
|
||||
1601205341.298501 sending message 105 to peer 0x5582eff8d5e0 (41 bytes)
|
||||
1601205341.298502 sending message 105 to peer 0x5582eff8d5e0 (42 bytes)
|
||||
1601205341.298504 sending message 105 to peer 0x5582eff8d5e0 (30 bytes)
|
||||
1601205341.298505 sending message 105 to peer 0x5582eff8d5e0 (158 bytes)
|
||||
1601205341.298507 sending message 105 to peer 0x5582eff8d5e0 (23 bytes)
|
||||
1601205341.298509 sending message 105 to peer 0x5582eff8d5e0 (31 bytes)
|
||||
1601205341.298510 sending message 105 to peer 0x5582eff8d5e0 (23 bytes)
|
||||
1601205341.298512 sending message 105 to peer 0x5582eff8d5e0 (24 bytes)
|
||||
1601205341.298513 sending message 105 to peer 0x5582eff8d5e0 (21 bytes)
|
||||
1601205341.298514 sending message 105 to peer 0x5582eff8d5e0 (20 bytes)
|
||||
1601205341.298516 sending message 105 to peer 0x5582eff8d5e0 (56 bytes)
|
||||
1601205341.298518 sending message 106 to peer 0x5582eff8d5e0 (0 bytes)
|
||||
1601205341.298519 sending message 200 to peer 0x5582eff8d5e0 (4 bytes)
|
||||
1601205341.298521 client loop enter
|
||||
1601205341.298781 peer 0x5582eff8d5e0 message 211
|
||||
1601205341.298786 client_write: sessions should be nested with care, unset $TMUX to force\n
|
||||
1601205341.298791 peer 0x5582eff8d5e0 message 203
|
||||
1601205341.298794 client loop exit
|
||||
|
|
@ -1 +1 @@
|
|||
serious
|
||||
gentoo
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,3 @@
|
|||
longtailfinancial
|
||||
holoviz
|
||||
cadcad
|
||||
blockscience
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
= Welcome to the serious vim wiki =
|
||||
This wiki will link web of thoughts and ideas that I have expressed throughout
|
||||
my computer.
|
||||
|
||||
== Header2 ==
|
||||
|
||||
=== Header3 ===
|
||||
|
||||
*bold text*
|
||||
_italic text_
|
||||
|
||||
[[vimwiki.md]]
|
||||
|
||||
[[test2.md]]
|
||||
[[wiki link|description]]
|
||||
|
||||
* bullet list item 1
|
||||
* bullet list item 2
|
||||
a) numbered list item 1
|
||||
b) numbered list item 2
|
||||
|
||||
{{{python
|
||||
def greet(s):
|
||||
print("Hello, " + s)
|
||||
}}}
|
||||
|
||||
| a table | |
|
||||
|---------|---|
|
||||
| | |
|
||||
Loading…
Reference in New Issue