From 039b925e15451850c70807977934908fe83d7d1b Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 20 Feb 2014 23:24:20 -0500 Subject: [PATCH] Initial commit with a relatively well configured package (config, theme and plugins), and a README to explain the details --- README.md | 31 ++ vim/bundle/SudoEdit.vim | 1 + vim/bundle/aspnet.vim--Abshire | 1 + vim/bundle/c-syntax-extensions/syntax/c.vim | 279 ++++++++++++ vim/bundle/emmet-vim | 1 + vim/bundle/hexHighlight.vim | 1 + vim/bundle/html5.vim | 1 + vim/bundle/lightline.vim | 1 + vim/bundle/neocomplcache.vim | 1 + vim/bundle/nerdtree | 1 + vim/bundle/perlomni.vim | 1 + vim/bundle/tagbar | 1 + vim/bundle/vim-fugitive | 1 + vim/bundle/vim-jquery | 1 + vim/bundle/vim-multiple-cursors | 1 + vim/bundle/vim-pathogen | 1 + vim/bundle/vim-surround | 1 + vim/bundle/vim-systemd-syntax | 1 + vim/bundle/vim-trailing-whitespace | 1 + vim/colors/darkcloud.vim | 466 ++++++++++++++++++++ vim/config/keyboard.vim | 141 ++++++ vim/config/plugins.vim | 57 +++ vim/config/settings.vim | 73 +++ vim/pathogen_update_plugins | 15 + vimrc | 41 ++ 25 files changed, 1120 insertions(+) create mode 100644 README.md create mode 160000 vim/bundle/SudoEdit.vim create mode 160000 vim/bundle/aspnet.vim--Abshire create mode 100644 vim/bundle/c-syntax-extensions/syntax/c.vim create mode 160000 vim/bundle/emmet-vim create mode 160000 vim/bundle/hexHighlight.vim create mode 160000 vim/bundle/html5.vim create mode 160000 vim/bundle/lightline.vim create mode 160000 vim/bundle/neocomplcache.vim create mode 160000 vim/bundle/nerdtree create mode 160000 vim/bundle/perlomni.vim create mode 160000 vim/bundle/tagbar create mode 160000 vim/bundle/vim-fugitive create mode 160000 vim/bundle/vim-jquery create mode 160000 vim/bundle/vim-multiple-cursors create mode 160000 vim/bundle/vim-pathogen create mode 160000 vim/bundle/vim-surround create mode 160000 vim/bundle/vim-systemd-syntax create mode 160000 vim/bundle/vim-trailing-whitespace create mode 100644 vim/colors/darkcloud.vim create mode 100644 vim/config/keyboard.vim create mode 100644 vim/config/plugins.vim create mode 100644 vim/config/settings.vim create mode 100755 vim/pathogen_update_plugins create mode 100644 vimrc diff --git a/README.md b/README.md new file mode 100644 index 0000000..e3f8217 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Darkcloud Vim Theme, Config and Plugin Selection + +## Requirements + +1. Git and Bash: Required to manage plugin updates using the "pathogen_update_plugins" script. +2. CTags: Available @ http://ctags.sourceforge.net, this can be in $PATH or in the vim folder and is required for the tagbar plugin. +3. Vim v7.4+: Everything has been written and tested using Vim 7.4.135, and I assume there could be issues with 7.3 and below. +4. Powerline Fonts (optional): Required for the powerline lightline theme, which can be toggled in /etc/vimrc along with the gVim font + +## Installation/Setup + +1. Edit the 'vimrc' file and select whether to expect powerline fonts, choose a font for gVim, and add or change any of the loaded config files to match your personal setup. +2. For a distro-agnostic system-wide installation in the /etc directory, copy: + * The 'vimrc' file to '/etc/vimrc' + * The 'vim' folder to '/etc/vim' +3. -or- For a single-user installation in a user's home directory, copy: + * The 'vimrc' file to '~/.vimrc' + * The 'vim' folder to '~/.vim' + * Note: When using the second installation type, the following line in the vimrc file isn't necessary (though it won't hurt to keep it): "set runtimepath+=/etc/vim". +4. Make sure the 'vimrc' file and 'vim' folder are at least readable to any users that will be using the config. +5. Clone additional vim plugin repos in the 'bundle' folder to have them loaded at startup, and you can add or replace config files in your 'vimrc' file to customize behaviour. +6. Run the pathogen_update_plugins script to update your plugins by running 'git pull' on each folder with a '.git' directory in the bundle folder. +7. The 'vim/config/keyboard.vim' file has a list of the commands it configures, as well as some basic examples of some provided directly by plugins (though check the plugin folder's README for a full explanation) + +## Credits + +* Written by prurigro: [Github Projects](https://github.com/prurigro) | [Archlinux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro) +* Many other authors have their work contained in this repo, most of which are self contained in the vim/bundle directory. I also used the Vim jellybean theme as a basis for the Darkcloud theme, which is maintained by NanoTech + +## License +All projects cloned in the vim/bundle folder are separate and have their own licenses. Everything else is released under the MIT license. diff --git a/vim/bundle/SudoEdit.vim b/vim/bundle/SudoEdit.vim new file mode 160000 index 0000000..750f728 --- /dev/null +++ b/vim/bundle/SudoEdit.vim @@ -0,0 +1 @@ +Subproject commit 750f7286c10e42cab2663a4a1bc38ae13b105a34 diff --git a/vim/bundle/aspnet.vim--Abshire b/vim/bundle/aspnet.vim--Abshire new file mode 160000 index 0000000..7a665fe --- /dev/null +++ b/vim/bundle/aspnet.vim--Abshire @@ -0,0 +1 @@ +Subproject commit 7a665fe28e5bb6c5f351be2c719ef55b246fe8a0 diff --git a/vim/bundle/c-syntax-extensions/syntax/c.vim b/vim/bundle/c-syntax-extensions/syntax/c.vim new file mode 100644 index 0000000..42c9b9d --- /dev/null +++ b/vim/bundle/c-syntax-extensions/syntax/c.vim @@ -0,0 +1,279 @@ +" Vim syntax file +" Language: C Additions +" Maintainer: Mikhail Wolfson +" 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 +" +" 0.3 - updates and fixes to cUserFunctionPointer, thanks to +" Alexei +" 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 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 + diff --git a/vim/bundle/emmet-vim b/vim/bundle/emmet-vim new file mode 160000 index 0000000..fb11bd8 --- /dev/null +++ b/vim/bundle/emmet-vim @@ -0,0 +1 @@ +Subproject commit fb11bd8b28fe30a4e95f8daacab34ccc2e6377e3 diff --git a/vim/bundle/hexHighlight.vim b/vim/bundle/hexHighlight.vim new file mode 160000 index 0000000..1d75780 --- /dev/null +++ b/vim/bundle/hexHighlight.vim @@ -0,0 +1 @@ +Subproject commit 1d7578067fcb1de1bcde88a3dfbc9a0be8088141 diff --git a/vim/bundle/html5.vim b/vim/bundle/html5.vim new file mode 160000 index 0000000..53f6c95 --- /dev/null +++ b/vim/bundle/html5.vim @@ -0,0 +1 @@ +Subproject commit 53f6c95974f2f612e3ed677334af735d3727833f diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim new file mode 160000 index 0000000..147cfbc --- /dev/null +++ b/vim/bundle/lightline.vim @@ -0,0 +1 @@ +Subproject commit 147cfbc4eb4326a7648d4bbdc24bee9d6dfb6d14 diff --git a/vim/bundle/neocomplcache.vim b/vim/bundle/neocomplcache.vim new file mode 160000 index 0000000..da44ba4 --- /dev/null +++ b/vim/bundle/neocomplcache.vim @@ -0,0 +1 @@ +Subproject commit da44ba4a92eef3860bdee2d96d755a7171889a70 diff --git a/vim/bundle/nerdtree b/vim/bundle/nerdtree new file mode 160000 index 0000000..b0bb781 --- /dev/null +++ b/vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit b0bb781fc73ef40365e4c996a16f04368d64fc9d diff --git a/vim/bundle/perlomni.vim b/vim/bundle/perlomni.vim new file mode 160000 index 0000000..60b39ac --- /dev/null +++ b/vim/bundle/perlomni.vim @@ -0,0 +1 @@ +Subproject commit 60b39ac6cd59ff14022fc024f1f0a7121a93c952 diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar new file mode 160000 index 0000000..614b5b2 --- /dev/null +++ b/vim/bundle/tagbar @@ -0,0 +1 @@ +Subproject commit 614b5b244f3a7a9e0174ebcf73c809de6e62e32c diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive new file mode 160000 index 0000000..8f0b8ed --- /dev/null +++ b/vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 8f0b8edfbd246c0026b7a2388e1d883d579ac7f6 diff --git a/vim/bundle/vim-jquery b/vim/bundle/vim-jquery new file mode 160000 index 0000000..192bf2a --- /dev/null +++ b/vim/bundle/vim-jquery @@ -0,0 +1 @@ +Subproject commit 192bf2a74621067919f39e130b94a990b2ee7458 diff --git a/vim/bundle/vim-multiple-cursors b/vim/bundle/vim-multiple-cursors new file mode 160000 index 0000000..35028be --- /dev/null +++ b/vim/bundle/vim-multiple-cursors @@ -0,0 +1 @@ +Subproject commit 35028be1f71953da9f2c28509bf6c5ebd1d31c28 diff --git a/vim/bundle/vim-pathogen b/vim/bundle/vim-pathogen new file mode 160000 index 0000000..1270dce --- /dev/null +++ b/vim/bundle/vim-pathogen @@ -0,0 +1 @@ +Subproject commit 1270dceb1fe0ca35f8b292c7b41b45b42c5a0cc1 diff --git a/vim/bundle/vim-surround b/vim/bundle/vim-surround new file mode 160000 index 0000000..42e9b46 --- /dev/null +++ b/vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit 42e9b46e7a20a2f394664874c7bbd9d6f6c39e8a diff --git a/vim/bundle/vim-systemd-syntax b/vim/bundle/vim-systemd-syntax new file mode 160000 index 0000000..aa1d4b4 --- /dev/null +++ b/vim/bundle/vim-systemd-syntax @@ -0,0 +1 @@ +Subproject commit aa1d4b4a8d027bcb28e019eda5609a43c8ef3ac4 diff --git a/vim/bundle/vim-trailing-whitespace b/vim/bundle/vim-trailing-whitespace new file mode 160000 index 0000000..4234770 --- /dev/null +++ b/vim/bundle/vim-trailing-whitespace @@ -0,0 +1 @@ +Subproject commit 423477008495c8c1699abe1c9fbf4b34e86e2f79 diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim new file mode 100644 index 0000000..4718a6c --- /dev/null +++ b/vim/colors/darkcloud.vim @@ -0,0 +1,466 @@ +"========================" +" " +" Darkcloud Vim Theme: " +" " +" Version: 1.0 " +" Maintainer: Prurigro " +" " +"========================" +" +" Acknowledgements: +" I found the jellybeans theme part way through creating +" this one and liked how it scripted compatibility between +" cterm and gui colours, so I stripped its colours and +" ported my in so I could use jellybeans as a functional +" template. +" +" As referenced in the original jellybean theme, the set +" of color approximation scripts were creaed by Henry +" So, Jr. and David Liang +" + +"remove all the colours before writing our own +hi clear +if exists("syntax_on") + syntax reset +endif + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + let s:low_color = 0 +else + let s:low_color = 1 +endif + +let colors_name = "darkcloud" + +"color approximation funcionality{{{ + "approximate the grey index from a given grey level + fun! s:grey_number(x) + if &t_Co == 88 + 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 + else + 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 + endif + endfun + + "find the grey level for a given grey index + fun! s:grey_level(n) + if &t_Co == 88 + 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 + else + if a:n == 0 + return 0 + else + return 8 + (a:n * 10) + endif + endif + endfun + + "find the palette index for a given grey index + fun! s:grey_color(n) + if &t_Co == 88 + if a:n == 0 + return 16 + elseif a:n == 9 + return 79 + else + return 79 + a:n + endif + else + if a:n == 0 + return 16 + elseif a:n == 25 + return 231 + else + return 231 + a:n + endif + endif + endfun + + "approximate the color index from a given color level + fun! s:rgb_number(x) + if &t_Co == 88 + if a:x < 69 + return 0 + elseif a:x < 172 + return 1 + elseif a:x < 230 + return 2 + else + return 3 + endif + else + 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 + endif + endfun + + "find the color level for a given color index + fun! s:rgb_level(n) + if &t_Co == 88 + if a:n == 0 + return 0 + elseif a:n == 1 + return 139 + elseif a:n == 2 + return 205 + else + return 255 + endif + else + if a:n == 0 + return 0 + else + return 55 + (a:n * 40) + endif + endif + endfun + + "find the palette index for a set of RGB color indices + fun! s:rgb_color(x, y, z) + if &t_Co == 88 + return 16 + (a:x * 16) + (a:y * 4) + a:z + else + return 16 + (a:x * 36) + (a:y * 6) + a:z + endif + endfun + + "find the palette index to approximate a set of RGB color levels + fun! s:color(r, g, b) + "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 + 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 + return s:grey_color(l:gx) + else + return s:rgb_color(l:x, l:y, l:z) + endif + else + return s:rgb_color(l:x, l:y, l:z) + endif + endfun + + "find the palette index to approximate the 'rrggbb' hex string + fun! s:rgb(rgb) + 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 + + "sets the highlighting for the given group + fun! s:X(group, fg, bg, attr, lcfg, lcbg) + if s:low_color + let l:fge = empty(a:lcfg) + let l:bge = empty(a:lcbg) + + if !l:fge && !l:bge + exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg + elseif !l:fge && l:bge + exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE" + elseif l:fge && !l:bge + exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg + endif + else + let l:fge = empty(a:fg) + let l:bge = empty(a:bg) + + if !l:fge && !l:bge + exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) + elseif !l:fge && l:bge + exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" + elseif l:fge && !l:bge + exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg) + endif + endif + + if a:attr == "" + exec "hi ".a:group." gui=none cterm=none" + else + let noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") + if empty(noitalic) + let noitalic = "none" + endif + exec "hi ".a:group." gui=".a:attr." cterm=".noitalic + endif + endfun +"}}} + +"COLOR SETTINGS: +if !exists("g:colorscheme_use_lowcolor_black") || g:colorscheme_use_lowcolor_black + let s:termBlack = "Black" +else + let s:termBlack = "Grey" +endif + +"format: (name ,fg ,bg ,style ,lowcolor-fg,lowcolor-bg) +"exmple: ("Sel","000000","f0f0f0","italic,bold",s:termBlack,"White") + +call s:X("Normal","bcbcbc","262626","","White",s:termBlack) + +if version >= 700 + " Auto-completion + call s:X("Pmenu","303030","87d7ff","","Grey","LightBlue") + call s:X("PmenuSel","bcbcbc","4e4e4e","","White","Black") + + call s:X("CursorLine","","3a3a3a","bold","",s:termBlack) + call s:X("CursorLineNr","000000","87d7ff","bold",s:termBlack,"Blue") + call s:X("CursorColumn","","3a3a3a","","",s:termBlack) + call s:X("MatchParen","","87d7ff","bold","","Blue") + + call s:X("TabLine","","000000","","",s:termBlack) + call s:X("TabLineFill","","000000","","",s:termBlack) + call s:X("TabLineSel","000000","ffffff","",s:termBlack,"White") +endif + +call s:X("Visual","","3a3a3a","","",s:termBlack) +call s:X("Cursor","000000","ffff00","underline",s:termBlack,"Yellow") + +call s:X("LineNr","ffaf00","","","Red","") +call s:X("Comment","626262","","","Grey","") +call s:X("Todo","5f0000","808080","","Red",s:termBlack) + +call s:X("StatusLine","000000","d75f5f","bold",s:termBlack,"Red") +call s:X("StatusLineNC","ffffff","626262","","White","Grey") +call s:X("VertSplit","626262","626262","",s:termBlack,s:termBlack) +call s:X("WildMenu","808080","303030","","White",s:termBlack) + +call s:X("Folded","ffaf00","262626","standout","Red",s:termBlack) +call s:X("FoldColumn","ffaf00","262626","bold","Red",s:termBlack) +call s:X("SignColumn","","000000","","",s:termBlack) +call s:X("ColorColumn","","000000","","",s:termBlack) + +call s:X("Title","d75f5f","","bold","Red","") +call s:X("Constant","ffaf00","","","Yellow","") +call s:X("Special","ffaf00","","","Yellow","") +call s:X("Delimiter","ffaf00","","","Yellow","") +call s:X("String","ffffff","","","White","") +call s:X("StringDelimiter","ffff00","","","Yellow","") +call s:X("Identifier","87d7ff","","","Blue","") +call s:X("Structure","d75f5f","","","Red","") +call s:X("Function","87d7ff","","","Blue","") +call s:X("Statement","ffd787","","","Yellow","") +call s:X("PreProc","ffd787","","","Yellow","") +call s:X("Operator","d75f5f","","","Red","") +call s:X("Type","87d7ff","","","Blue","") +call s:X("NonText","ffff00","","","Yellow","") +call s:X("SpecialKey","000000","","",s:termBlack,"") +call s:X("Search","ffffff","d75f5f","bold","White","Red") +call s:X("IncSearch","87d7ff","626262","standout","Blue","Grey") +call s:X("Directory","ffff00","","","Yellow","") +call s:X("ErrorMsg","5f0000","ffaf00","bold","DarkRed","Yellow") +hi! link Error ErrorMsg +hi! link MoreMsg Special +call s:X("Question","ffaf00","","","","") + +"spell checking +call s:X("SpellBad","bcbcbc","262626","undercurl","White",s:termBlack) +call s:X("SpellCap","bcbcbc","262626","undercurl","White",s:termBlack) +call s:X("SpellRare","bcbcbc","262626","undercurl","White",s:termBlack) +call s:X("SpellLocal","bcbcbc","262626","undercurl","White",s:termBlack) + +"diff +hi! link diffRemoved Constant +hi! link diffAdded String +call s:X("DiffAdd","000000","00ff00","",s:termBlack,"Green") +call s:X("DiffDelete","000000","d75f5f","",s:termBlack,"Red") +call s:X("DiffChange","000000","87d7ff","",s:termBlack,"Blue") +call s:X("DiffText","000000","626262","bold",s:termBlack,"White") + +"php +hi! link phpFunctions Function +call s:X("StorageClass","","","","","") +hi! link phpSuperglobal Identifier +hi! link phpQuoteSingle StringDelimiter +hi! link phpQuoteDouble StringDelimiter +hi! link phpBoolean Constant +hi! link phpNull Constant +hi! link phpArrayPair Operator + +"ruby +hi! link rubySharpBang Comment +call s:X("rubyClass","","","","","") +call s:X("rubyIdentifier","","","","","") +hi! link rubyConstant Type +hi! link rubyFunction Function +call s:X("rubyInstanceVariable","","","","","") +call s:X("rubySymbol","","","","","") +hi! link rubyGlobalVariable rubyInstanceVariable +hi! link rubyModule rubyClass +call s:X("rubyControl","","","","","") +hi! link rubyString String +hi! link rubyStringDelimiter StringDelimiter +hi! link rubyInterpolationDelimiter Identifier +call s:X("rubyRegexpDelimiter","","","","","") +call s:X("rubyRegexp","","","","","") +call s:X("rubyRegexpSpecial","","","","","") +call s:X("rubyPredefinedIdentifier","","","","","") + +"javaScript +hi! link javaScriptValue Constant +hi! link javaScriptRegexpString rubyRegexp + +"coffeeScript +hi! link coffeeRegExp javaScriptRegexpString + +"lua +hi! link luaOperator Conditional + +"c +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 + +"debugger.vim +call s:X("DbgCurrent","","","","","") +call s:X("DbgBreakPt","","","","","") + +"vim-indent-guides +call s:X("IndentGuidesOdd","","7c7c7c","","","") +call s:X("IndentGuidesEven","","1c1c1c","","","") +if !exists("g:indent_guides_auto_colors") + let g:indent_guides_auto_colors = 0 +endif + +"plugins, etc. +hi! link TagListFileName Directory + +"delete functions {{{ + delf s:X + delf s:rgb + 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 +"}}} + +"lightline statusbar colours {{{ + let s:base3 = '#eaeaea' + let s:base23 = '#d0d0d0' + let s:base2 = '#c6c6c6' + let s:base1 = '#b2b2b2' + let s:base0 = '#949494' + let s:base00 = '#767676' + let s:base01 = '#606060' + let s:base02 = '#4e4e4e' + let s:base023 = '#303030' + let s:darkblue = '#005fff' + let s:red = '#d75f5f' + let s:orange = '#ffaf00' + let s:yellow = '#ffd787' + let s:green = '#5faf00' + let s:cyan = '#d7ffff' + let s:blue = '#87d7ff' + let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + let s:p.normal.left = [ [ s:base023, s:blue ], [ s:base3, s:base01 ] ] + let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] + let s:p.inactive.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ] + let s:p.inactive.left = [ [ s:base02, s:base0 ], [ s:base00, s:darkblue ] ] + let s:p.insert.left = [ [ s:base023, s:red ], [ s:base3, s:base01 ] ] + let s:p.replace.left = [ [ s:base023, s:orange ], [ s:base3, s:base01 ] ] + let s:p.visual.left = [ [ s:base023, s:green ], [ s:base3, s:base01 ] ] + let s:p.normal.middle = [ [ s:base1, s:base02 ] ] + let s:p.inactive.abmiddle = [ [ s:base0, s:base02 ] ] + let s:p.tabline.left = [ [ s:base2, s:base01 ] ] + let s:p.tabline.tabsel = [ [ s:base2, s:base023 ] ] + let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] + let s:p.tabline.right = copy(s:p.normal.right) + let s:p.normal.error = [ [ s:red, s:base023 ] ] + let s:p.normal.warning = [ [ s:yellow, s:base02 ] ] + let g:lightline#colorscheme#darkcloud#palette = lightline#colorscheme#fill(s:p) + + "theme config (powerline fonts) + if powerlinefonts == 1 + let g:lightline = {'colorscheme': 'darkcloud', 'active': {'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'readonly', 'filename', 'modified' ] ]}, 'component': {'readonly': '%{&readonly?"":""}', 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}','fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'},'component_visible_condition': {'readonly': '(&filetype!="help"&& &readonly)','modified': '(&filetype!="help"&&(&modified||!&modifiable))', 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'}, 'separator': {'left': '', 'right': ''}, 'subseparator': {'left': '', 'right': ''}} + else + let g:lightline = {'colorscheme': 'darkcloud','active': {'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'readonly', 'filename', 'modified' ] ]},'component': {'readonly': '%{&readonly?"x":""}', 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'},'component_visible_condition': {'readonly': '(&filetype!="help"&& &readonly)','modified': '(&filetype!="help"&&(&modified||!&modifiable))', 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'},'separator': {'left': '', 'right': ''},'subseparator': {'left': '|', 'right': '|'}} + endif +"}}} diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim new file mode 100644 index 0000000..e3a6392 --- /dev/null +++ b/vim/config/keyboard.vim @@ -0,0 +1,141 @@ +"===========================" +" " +" Keyboard Configuration: " +" " +"===========================" +" +" Reference: (view plugin documentation for the full list of commands each offers) +" , | (A) -> follows an emme term to expand it (ie: 'html:5') +" | (N) -> toggle hexhighlight's hexcode to colours in :gui +" cs'" | (N) -> replace surrounding '' with "" (other delims work) +" cs" | (N) -> replace surrounding "" with tags +" cst" | (N) -> replace any tag (ie: ) with quotes +" ds | (N) -> removes delimiters +" | (N) -> mark for multiple cursors, or select the next match +" +" Mappings: +" | (A) -> go to the next open tab +"

| (A) -> go to the previous open tab +" | (V) -> indent a block in visual mode +" | (V) -> unindent a block in visual mod +" | (N) -> toggle the nerdtree sidebar +" | (N) -> toggle the tagbar sidebar +" | (A) -> toggle row/column highlighting +" | (A) -> toggle line numbers +" | (N) -> toggle line wrapping +" | (A) -> toggle visible trailing whitespace +" | (A) -> toggle collapsed/folded rows +" | (N) -> format document and return to current line +" | (N) -> format document and return to current line +" +" (git-fugitive) +" G | (N) -> Git : view the menu +" gc | (N) -> Gcommit : make a commit +" gd | (N) -> Gdiff * : show differences since the last commit +" ge | (N) -> Gedit : edit the git metadata +" gl | (N) -> Glog : view the commit and differences log +" gs | (N) -> Gstatus : view status info about the git repo +" +" (neocomplcache) +" | (I) -> write the part common to all suggestions +" | (I) -> cancle the match dialog (during suggestion) +" | (N) -> undo the most recent match selection +" +" GVim Mappings: +" | (A) -> toggle the menu +" | (A) -> toggle the toolbar +" | (A) -> toggle the scrollbar +" +" Aliases: +" :mc | (N) -> :MultipleCursorsFind (multiple cursors via regex) +" :wsudo | (N) -> :SudoWrite (write the file as root using sudo) +" :rsudo | (N) -> :SudoRead (read a file as root using sudo) +" +" Notes: +" *by the default key is: \ +" + +"===========" +" Mappings: " +"===========" +"tab and untabbing selected blocks +vmap >gv +vmap n ':tabn' +nnoremap p ':tabp' + +"toggle the nerd tree sidebar +nnoremap ':NERDTree' + +"toggle the tagbar sidebar +nnoremap ':TagbarToggle' + +"toggle the cursor line and column +nnoremap ':set cursorline! cursorcolumn!' + +"toggle the display of line numbers +nnoremap ':set number!' + +"toggle line wrapping (and bottom bar if using the gui) +if !has("gui_running") + nnoremap ':set wrap!' +else + nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" +endif + +"toggle the display of whitespace +nnoremap ':set list!' + +"toggle folded code at foldpoints +inoremap za +nnoremap za +onoremap za +vnoremap zf + +"format document then return to current line +nnoremap mzgg=G`z + +"remove trailing white space +nnoremap ':FixWhitespace' + +"various git fugitive functions +nnoremap G ':Git' +nnoremap gc ':Gcommit' +nnoremap gd ':Gdiff *' +nnoremap ge ':Gedit' +nnoremap gl ':Glog' +nnoremap gs ':Gstatus' + +"neocomplcache suggestions: cancel, autocomplete, scroll up and scroll down +inoremap pumvisible() ? neocomplcache#complete_common_string() : "\" +inoremap pumvisible() ? neocomplcache#close_popup() : "\" +inoremap neocomplcache#undo_completion() + +"compatibility hack for proper keyboard config in screen/tmux +if $TERM =~ '^screen-256color' + nmap OH + imap OH + nmap OF + imap OF +endif + +"================" +" GVim Mappings: " +"================" +"map toggles for the menu, toolbar and scrollbar +noremap ":if &go=~#'m'set go-=melseset go+=mendif" +noremap ":if &go=~#'T'set go-=Telseset go+=Tendif" +noremap ":if &go=~#'r'set go-=relseset go+=rendif" + +"enable middle-click paste while holding shift +map +map! + +"==========" +" Aliases: " +"==========" +cabbrev mc MultipleCursorsFind +cabbrev wsudo SudoWrite +cabbrev rsudo SudoRead diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim new file mode 100644 index 0000000..03904a9 --- /dev/null +++ b/vim/config/plugins.vim @@ -0,0 +1,57 @@ +"==========================" +" " +" Plugins Configuration: " +" " +"==========================" + +"PATHOGEN BUNDLED EXTENSIONS PLUGIN: LOAD BUNDLED PLUGINS {{{" + execute pathogen#infect() +"}}} + +"NEOCOMPLCACHE AUTOCOMPLETION PLUGIN: ENABLE, CONFIG AND SETUP OMNICOMPLETION {{{" + let g:neocomplcache_enable_at_startup = 1 + let g:neocomplcache_enable_smart_case = 1 + let g:neocomplcache_min_syntax_length = 3 + let g:neocomplcache_max_list=10 + let g:neocomplcache_enable_insert_char_pre = 1 + let g:neocomplcache_enable_underbar_completion = 1 + let g:neocomplcache_enable_camel_case_completion = 1 + let g:neocomplcache_wildcard_characters = {'_': '-'} + + if has("autocmd") && exists("+omnifunc") + autocmd Filetype * if &omnifunc == "" | setlocal omnifunc=syntaxcomplete#Complete | endif + endif + + autocmd FileType c setlocal omnifunc=ccomplete#Complete + autocmd FileType cpp setlocal omnifunc=omni#cpp#complete#Main + autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags + autocmd FileType ruby set omnifunc=rubycomplete#Complete + autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP + + if !exists('g:neocomplcache_omni_patterns') | let g:neocomplcache_omni_patterns = {} | endif + let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' + let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' + let g:neocomplcache_omni_patterns.xml='<[^>]*' + let g:neocomplcache_omni_patterns.html='<[^>]*' + let g:neocomplcache_omni_patterns.xhtml='<[^>]*' + let g:neocomplcache_omni_patterns.markdown='<[^>]*' + let g:neocomplcache_omni_patterns.css='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' + let g:neocomplcache_omni_patterns.less='^\s\+\w+\|\w+[):;]?\s\+\|[@!]' + let g:neocomplcache_omni_patterns.javascript='[^. \t]\.\%(\h\w*\)\?' + let g:neocomplcache_omni_patterns.python = '[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' + + let g:neocomplcache_omni_patterns.actionscript = '[^. \t][.:]\h\w*' + let g:neocomplcache_omni_patterns.python3 = '[^. *\t]\.\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.go = '\h\w*\%.' + let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::' + let g:neocomplcache_omni_patterns.java = '\%(\h\w*\|)\)\.' + let g:neocomplcache_omni_patterns.objc = '\h\w\+\|\h\w*\%(\.\|->\)\h\w*' + let g:neocomplcache_omni_patterns.objj = '[\[ \.]\w\+$\|:\w*$' + let g:neocomplcache_omni_patterns.vimshell= '\%(\\[^[:alnum:].-]\|[[:alnum:]@/.-_+,#$%~=*]\)\{2,}' +"}}} + +"ASPNET ABSHIRE SYNTAX PLUGIN: {{{ + au BufRead,BufNewFile *.aspx,*.asmx,*.ascx,*.master set syntax=aspnet +"}}} diff --git a/vim/config/settings.vim b/vim/config/settings.vim new file mode 100644 index 0000000..df51b01 --- /dev/null +++ b/vim/config/settings.vim @@ -0,0 +1,73 @@ +"===============================" +" " +" Vim Settings Configuration: " +" " +"===============================" + +"================" +" Compatibility: " +"================" +set nocompatible "enable vim specific capabilities" +set lazyredraw "only redraw what needs to be redrawn" +set encoding=utf-8 "set encoding" +set fileformats=unix,dos,mac "set compatible line endings in order of preference" + +if $TERM =~ '^linux' + set t_Co=8 "use 8 colours when a vterm is detected +elseif !has("gui_running") + set t_Co=256 "assume 256 colours when any other terminal is detected +endif + +"=========" +" Syntax: " +"=========" +filetype plugin indent on +syntax on "turn syntax highlighting on +set foldmethod=syntax foldcolumn=1 foldlevel=8 "configure how folding code works + +"============" +" Filetypes: " +"============" +au BufNewFile,BufRead *cjdroute.conf setf javascript "set syntax for *.cjdroute.conf to javascript +au BufNewFile,BufRead *.txt set spell "enable spellcheck for text files (*.txt) + +"==========" +" General: " +"==========" +set cursorline cursorcolumn "enable row/column highlighting +set splitright "add new tiles on the right (and not left) when added +set scrolloff=5 sidescrolloff=5 "how many vertical and horizontal characters left before scrolling +set number "enable line numbers +set list listchars=tab:>-,trail:- "display whitespace +set nowrap "disable line wrapping +set autochdir "current dir is file dir +set backspace=indent,eol,start "enables backspacing +set history=60 "undo history +set mouse=a "enables mouse +set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines +set clipboard=unnamed "enable copy/paste support between vim and xorg's middle-click style clipboard +set textwidth=0 "the default width text will go before breaking when line breaks are enabled +set nolinebreak "disable linebreaks, though this will be overridden by filetype plugins +set showmatch "show matching open bracket when closed bracket is inserted +set matchtime=5 "the amount of time the matching bracket will highlight +set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs +set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config +set hlsearch incsearch ignorecase smartcase "configure search + +"enable menu tab completion, configure its behaviour and set configure suffixes to reduce priority for and ignore" +set completeopt=longest,menuone +set wildmenu +set wildmode=list:longest +set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc + +"==================" +" GVim GUI Config: " +"==================" +set guioptions-=T "remove the toolbar + +if &wrap + set go-=b "disable the bottom scrollbar iff text wrapping is enabled +else + set go+=b "enable the bottom scrollbar iff text wrapping is disabled +endif diff --git a/vim/pathogen_update_plugins b/vim/pathogen_update_plugins new file mode 100755 index 0000000..6dd83ba --- /dev/null +++ b/vim/pathogen_update_plugins @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +#Update pathogen bundles +pushd bundle > /dev/null 2>&1 + for each in *; do + if [ -d "$each" ]; then + pushd "$each" > /dev/null 2>&1 + if [ -d .git ]; then + echo "Updating ${each}..." + git pull + fi + popd > /dev/null 2>&1 + fi + done +popd > /dev/null 2>&1 diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..0b141e8 --- /dev/null +++ b/vimrc @@ -0,0 +1,41 @@ +"===============" +" " +" Vim Config: " +" " +"===============" +" +" Notes: +" Tmux requires the '-2' flag to be set when +" launched for vim to use more than just the +" set of terminal colours. +" +" The ctags package should be downloaded from +" http://ctags.sourceforge.net and installed +" to $PATH +" +" To use lightline with powerline fonts, set +" powerlinefonts=1 below, and ensure guifont is +" set to a powerline patched font. For example: +" guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12 + +"Powerline Font Support: (1:enabled, 0:disabled) +let powerlinefonts=1 + +"GVim Font Selection: (term font set by terminal) +set guifont=Droid\ Sans\ Mono\ for\ Powerline\ 12 + +"Add Config Directory: (distro-agnostic system-wide) +set runtimepath+=/etc/vim + +"Load Settings: +runtime config/settings.vim + +"Load Plugins: +runtime bundle/vim-pathogen/autoload/pathogen.vim +runtime config/plugins.vim + +"Configure Keymappings: +runtime config/keyboard.vim + +"Load Theme: +colorscheme darkcloud