🗑 Deletes pretty much everything

This commit is contained in:
Alicia Sykes 2022-03-09 22:10:10 +00:00
parent 08881b5eee
commit 6909ff08ed
103 changed files with 0 additions and 14165 deletions

@ -1 +0,0 @@
Subproject commit 4ec846cdad4c5f6996523e7015f0b36a6b40e9f6

View File

@ -1,47 +0,0 @@
#!/bin/bash
## Define all the colors
COL_USER_HOST='\e[35m' # The color of 'user@host.ext'
COL_CURSOR='\e[35m' # The color of the trailing cursor arrow
COL_CURRENT_PATH='\e[37m' # The color of the current directory full path
COL_GIT_STATUS_CLEAN='\e[93m' # Color of fresh git branch name, with NO changes
COL_GIT_STATUS_CHANGES='\e[92m' # Color of git branch, affter its diverged from remote
## Text Styles
RESET='\e[0m' # What color will comand outputs be in
BOLD='\e[1m' # BOLD
## Config
SHOW_GIT=false
## If this is a valid git repo, echo the current branch name
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
## Echos what color the git branch should be (depending on changes)
check_for_git_changes() {
if [[ "$(parse_git_branch)" ]]; then
if [[ $(git status --porcelain) ]]; then
echo ${COL_GIT_STATUS_CLEAN}
else
echo ${COL_GIT_STATUS_CHANGES}
fi
fi
}
## Build-up what will be the final PS1 string
set_bash_prompt(){
PS1="${RESET}"
PS1+="${BOLD}${COL_USER_HOST}\u @ \h ${RESET}${COL_CURRENT_PATH}\w "
if [ "$SHOW_GIT" = true ] ; then
PS1+="$(check_for_git_changes)"
PS1+="$(parse_git_branch)"
fi
PS1+="\n${COL_CURSOR}└─▶ "
PS1+="${RESET}"
}
## Done, now just set the PS1 prompt :)
PROMPT_COMMAND=set_bash_prompt
##
if hash zsh 2>/dev/null; then
zsh
fi
source "$HOME/.cargo/env"

@ -1 +0,0 @@
Subproject commit 113826b161c1b1e54d2b5b3f26bd2fc8fc46ed92

@ -1 +0,0 @@
Subproject commit d5007d4694b02f4abd1f9b4dbaf61aaa8345acea

@ -1 +0,0 @@
Subproject commit 82f4fbcaee7ece775f37cf7ed201f9d4beab76b8

@ -1 +0,0 @@
Subproject commit 5b09bd955292ae33ef6d3519df09b5bc1b0ff49e

@ -1 +0,0 @@
Subproject commit 12c4818f50aa43f7a637d031f93f122337d92b6f

@ -1 +0,0 @@
Subproject commit 4a36ded50f89fd03e81ed1013ea9c73381c58160

@ -1 +0,0 @@
Subproject commit e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5

@ -1 +0,0 @@
Subproject commit 7c59902f64dcd7ea356e891274b21144d1ea5948

@ -1 +0,0 @@
Subproject commit 1b1a436e19f095ae8f825243dbe29800a8acd25c

View File

@ -1 +0,0 @@
/home/alicia/dotfiles/tmux/tpm

View File

@ -1,36 +0,0 @@
# Import Tmux plugins using TMP
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'thewtex/tmux-mem-cpu-load'
# Set Shell
set -g default-shell /bin/zsh
# Set Theme
set -g @themepack 'powerline/default/cyan'
# Automatically restore session
set -g @continuum-restore 'on'
# Configure Tmux-prefix-highlight
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# Show current internet status
set -g status-right "Online: #{online_status} | %a %h-%d %H:%M "
# Show system resource usage
set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]"
# Use DDG as the default search engine (for Tmux-open)
set -g @open-S 'https://www.duckduckgo.com/'
# Initialize Tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'

View File

@ -1,14 +0,0 @@
setlocal foldmethod=syntax
setlocal nospell
let b:ale_linters = ['elm_ls']
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'elm-format']
let b:ale_linters_ignore = { 'elm': ['make'] }
" autocompleting ought to be provided via elm-language-server
" also when coding elm there's an error from deoplete telling
" that elm-oracle is not available
" but then again elm-oracle does not work with 0.19
" issue <| https://github.com/pbogut/deoplete-elm/issues/3
let b:deoplete_disable_auto_complete = 1
let b:ale_completion_enabled = 1

View File

@ -1 +0,0 @@
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines']

View File

@ -1 +0,0 @@
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'prettier']

View File

@ -1,6 +0,0 @@
fu! s:InstallRequirements()
silent !clear
execute '!' . 'pip install -r ' . bufname('%')
endfu
:command! -bar InstallRequirements :call s:InstallRequirements()

View File

@ -1,2 +0,0 @@
let b:ale_fixers = ['trim_whitespace', 'shfmt']
let b:ale_linters = ['shellcheck', 'language_server']

View File

@ -1,4 +0,0 @@
setlocal nospell
setlocal encoding=utf-8
setlocal tabstop=2
setlocal shiftwidth=2

View File

@ -1 +0,0 @@
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'prettier']

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,291 +0,0 @@
" Name: Synthwave84
" Author: Anikin Artyom <anikinartyom@gmail.com>
" Maintainer: Anikin Artyom <anikinartyom@gmail.com>
" Website: https://github.com/artanikin/vim-synthwave84
" License: Vim License (see `:help license`)
" Last Updated: Wed Aug 7 12:28:29 2019
" Generated by Colortemplate v2.0.0
set background=dark
hi clear
if exists('syntax_on')
syntax reset
endif
let g:colors_name = 'synthwave84'
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
hi! link EndOfBuffer NonText
hi! link QuickFixLine Search
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
hi! link Define PreProc
hi! link Debug Special
hi! link Delimiter Special
hi! link Exception Statement
hi! link Float Number
hi! link Function Identifier
hi! link Keyword Statement
hi! link Label Statement
hi! link Macro PreProc
hi! link Number Constant
hi! link Operator Statement
hi! link PreCondit PreProc
hi! link Repeat Statement
hi! link SpecialChar Special
hi! link SpecialComment Special
hi! link StorageClass Type
hi! link Structure Type
hi! link Tag Special
hi! link Typedef Type
hi! link lCursor Cursor
hi! link jsFlowMaybe Normal
hi! link jsFlowObject Normal
hi! link jsFlowType PreProc
hi! link jsClassDefinition Normal
hi! link jsClassFuncName Title
hi! link jsImport Include
hi! link jsExport Include
hi! link jsFrom PreProc
hi! link jsFuncName Identifier
hi! link jsFutureKeys Statement
hi! link jsFuncCall Identifier
hi! link jsModuleKeywords Statement
hi! link jsModuleOperators Statement
hi! link jsNull Constant
hi! link jsObjectFuncName Identifier
hi! link jsObjectKey Title
hi! link jsSuper Statement
hi! link jsTemplateBraces Special
hi! link jsUndefined Constant
hi! link jsFunction PreProc
hi! link jsThis Constant
hi! link jsStorageClass PreProc
hi! link jsVariableDef Title
hi! link jsAsyncKeyword Title
hi! link jsFuncArgs Title
hi! link jsArrowFuncArgs Title
hi! link jsArrowFunction PreProc
hi! link jsObjectShorthandProp Title
hi! link jsGlobalObjects Constant
hi! link jsModuleKeyword Title
hi! link jsClassStringKey Title
hi! link jsObjectKeyComputed Title
hi! link jsObjectValue Title
hi! link jsBlockLabel Title
hi! link jsBlockLabelKey Title
hi! link rubyClass PreProc
hi! link rubyConstant Constant
hi! link rubyInstanceVariable Title
hi! link rubyInterpolationDelimiter Identifier
hi! link rubyModule Statement
hi! link rubyFunction Identifier
hi! link rubyInclude Include
hi! link markdownBold Special
hi! link markdownCode String
hi! link markdownCodeDelimiter String
hi! link markdownHeadingDelimiter Comment
hi! link markdownRule Comment
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['Black', 'DarkRed', 'DarkGreen', 'DarkYellow',
\ 'DarkBlue', 'DarkMagenta', 'DarkCyan', 'LightGrey', 'DarkGrey', 'Red',
\ 'Green', '#FEDE5D', 'Blue', '#D884C7', 'Cyan', 'White']
hi Normal guifg=#ECEBED guibg=#262335 guisp=NONE gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Cursor guifg=Black guibg=fg guisp=NONE gui=NONE cterm=NONE
hi CursorColumn guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi CursorLineNr guifg=#D4D3D7 guibg=#2C2540 guisp=NONE gui=bold cterm=bold
hi DiffAdd guifg=NONE guibg=#90DEB6 guisp=NONE gui=NONE cterm=NONE
hi DiffChange guifg=NONE guibg=#D884C7 guisp=NONE gui=NONE cterm=NONE
hi DiffDelete guifg=Black guibg=#EB8F82 guisp=NONE gui=bold cterm=bold
hi DiffText guifg=NONE guibg=Red guisp=NONE gui=bold cterm=bold
hi FoldColumn guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Folded guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi LineNr guifg=#888690 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi NonText guifg=#495495 guibg=NONE guisp=NONE gui=bold cterm=bold
hi Pmenu guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#3E3B4B guisp=NONE gui=NONE cterm=NONE
hi PmenuSel guifg=#ECEBED guibg=#495495 guisp=NONE gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ECEBED guisp=NONE gui=NONE cterm=NONE
hi Search guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi SignColumn guifg=#888690 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi SignColumn guifg=#ECEBED guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=bold,reverse cterm=bold,reverse
hi StatusLineNC guifg=#ECEBED guibg=#2C2540 guisp=NONE gui=reverse cterm=reverse
hi TabLine guifg=#495495 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi TabLineSel guifg=#EB8F82 guibg=#2C2540 guisp=NONE gui=NONE cterm=NONE
hi Title guifg=#D884C7 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Todo guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi VertSplit guifg=#2C2540 guibg=#495495 guisp=NONE gui=reverse cterm=reverse
hi Visual guifg=NONE guibg=#3E3B4B guisp=NONE gui=NONE cterm=NONE
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=bold,underline ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu guifg=Black guibg=#FEDE5D guisp=NONE gui=NONE cterm=NONE
hi Comment guifg=#495495 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Constant guifg=#E55A5E guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Error guifg=#ECEBED guibg=Red guisp=NONE gui=NONE cterm=NONE
hi Identifier guifg=#40ffff guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Ignore guifg=Black guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Include guifg=#90DEB6 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi PreProc guifg=#FEDE5D guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Special guifg=#EA9652 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Statement guifg=#FEDE5D guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi String guifg=#EA9652 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Type guifg=#E55A5E guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi Underlined guifg=#40ffff guibg=NONE guisp=NONE gui=underline cterm=underline
hi rubySymbol guifg=#EB8F82 guibg=NONE guisp=NONE gui=NONE cterm=NONE
hi rubyBoolean guifg=#EB8F82 guibg=NONE guisp=NONE gui=NONE cterm=NONE
unlet s:t_Co
finish
endif
if s:t_Co >= 256
hi Normal ctermfg=7 ctermbg=8 cterm=NONE
if !has('patch-8.0.0616') " Fix for Vim bug
set background=dark
endif
hi ColorColumn ctermfg=NONE ctermbg=7 cterm=NONE
hi Cursor ctermbg=fg cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=7 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=7 cterm=NONE
hi CursorLineNr ctermfg=7 ctermbg=7 cterm=NONE
hi DiffAdd ctermfg=NONE ctermbg=121 cterm=NONE
hi DiffChange ctermfg=NONE ctermbg=13 cterm=NONE
hi DiffDelete ctermbg=224 cterm=NONE
hi DiffText ctermfg=NONE ctermbg=9 cterm=bold
hi FoldColumn ctermfg=14 ctermbg=7 cterm=NONE
hi Folded ctermfg=14 ctermbg=7 cterm=NONE
hi LineNr ctermfg=7 ctermbg=NONE cterm=NONE
hi NonText ctermfg=14 ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=7 ctermbg=7 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=8 cterm=NONE
hi PmenuSel ctermfg=7 ctermbg=14 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=7 cterm=NONE
hi Search ctermbg=11 cterm=NONE
hi SignColumn ctermfg=7 ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=7 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=7 ctermbg=7 cterm=NONE
hi StatusLine ctermfg=7 ctermbg=7 cterm=bold,reverse
hi StatusLineNC ctermfg=7 ctermbg=7 cterm=reverse
hi TabLine ctermfg=14 ctermbg=7 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=7 cterm=NONE
hi TabLineSel ctermfg=224 ctermbg=7 cterm=NONE
hi Title ctermfg=13 ctermbg=NONE cterm=NONE
hi Todo ctermbg=11 cterm=NONE
hi VertSplit ctermfg=7 ctermbg=14 cterm=reverse
hi Visual ctermfg=NONE ctermbg=8 cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu ctermbg=11 cterm=NONE
hi Comment ctermfg=14 ctermbg=NONE cterm=NONE
hi Constant ctermfg=9 ctermbg=NONE cterm=NONE
hi Error ctermfg=7 ctermbg=9 cterm=NONE
hi Identifier ctermfg=14 ctermbg=NONE cterm=NONE
hi Ignore ctermbg=NONE cterm=NONE
hi Include ctermfg=121 ctermbg=NONE cterm=NONE
hi PreProc ctermfg=11 ctermbg=NONE cterm=NONE
hi Special ctermfg=224 ctermbg=NONE cterm=NONE
hi Statement ctermfg=11 ctermbg=NONE cterm=NONE
hi String ctermfg=224 ctermbg=NONE cterm=NONE
hi Type ctermfg=9 ctermbg=NONE cterm=NONE
hi Underlined ctermfg=14 ctermbg=NONE cterm=underline
hi rubySymbol ctermfg=224 ctermbg=NONE cterm=NONE
hi rubyBoolean ctermfg=224 ctermbg=NONE cterm=NONE
unlet s:t_Co
finish
endif
if s:t_Co >= 8
hi Normal ctermfg=LightGray ctermbg=DarkGray cterm=NONE
if !has('patch-8.0.0616') " Fix for Vim bug
set background=dark
endif
hi ColorColumn ctermfg=NONE ctermbg=LightGray cterm=NONE
hi Cursor ctermfg=Black ctermbg=fg cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=LightGray cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=LightGray cterm=NONE
hi CursorLineNr ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi DiffAdd ctermfg=NONE ctermbg=LightGreen cterm=NONE
hi DiffChange ctermfg=NONE ctermbg=Magenta cterm=NONE
hi DiffDelete ctermfg=Black ctermbg=LightRed cterm=NONE
hi DiffText ctermfg=NONE ctermbg=Red cterm=bold
hi FoldColumn ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi Folded ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi LineNr ctermfg=LightGray ctermbg=NONE cterm=NONE
hi NonText ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=DarkGray cterm=NONE
hi PmenuSel ctermfg=LightGray ctermbg=Cyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=LightGray cterm=NONE
hi Search ctermfg=Black ctermbg=Yellow cterm=NONE
hi SignColumn ctermfg=LightGray ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=LightGray ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=LightGray ctermbg=LightGray cterm=NONE
hi StatusLine ctermfg=LightGray ctermbg=LightGray cterm=bold,reverse
hi StatusLineNC ctermfg=LightGray ctermbg=LightGray cterm=reverse
hi TabLine ctermfg=Cyan ctermbg=LightGray cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=LightGray cterm=NONE
hi TabLineSel ctermfg=LightRed ctermbg=LightGray cterm=NONE
hi Title ctermfg=Magenta ctermbg=NONE cterm=NONE
hi Todo ctermfg=Black ctermbg=Yellow cterm=NONE
hi VertSplit ctermfg=LightGray ctermbg=Cyan cterm=reverse
hi Visual ctermfg=NONE ctermbg=DarkGray cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi WildMenu ctermfg=Black ctermbg=Yellow cterm=NONE
hi Comment ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Constant ctermfg=Red ctermbg=NONE cterm=NONE
hi Error ctermfg=LightGray ctermbg=Red cterm=NONE
hi Identifier ctermfg=Cyan ctermbg=NONE cterm=NONE
hi Ignore ctermfg=Black ctermbg=NONE cterm=NONE
hi Include ctermfg=LightGreen ctermbg=NONE cterm=NONE
hi PreProc ctermfg=Yellow ctermbg=NONE cterm=NONE
hi Special ctermfg=LightRed ctermbg=NONE cterm=NONE
hi Statement ctermfg=Yellow ctermbg=NONE cterm=NONE
hi String ctermfg=LightRed ctermbg=NONE cterm=NONE
hi Type ctermfg=Red ctermbg=NONE cterm=NONE
hi Underlined ctermfg=Cyan ctermbg=NONE cterm=underline
hi rubySymbol ctermfg=LightRed ctermbg=NONE cterm=NONE
hi rubyBoolean ctermfg=LightRed ctermbg=NONE cterm=NONE
unlet s:t_Co
finish
endif
" Color: black Black 0 Black
" Color: blue Blue 12 Blue
" Color: cyan Cyan 14 Cyan
" Color: cyanidentifier #40ffff 14 Cyan
" Color: darkblue DarkBlue 4 DarkBlue
" Color: darkcyan DarkCyan 6 DarkCyan
" Color: darkgreen DarkGreen 2 DarkGreen
" Color: darkmagenta DarkMagenta 5 DarkMagenta
" Color: darkred DarkRed 1 DarkRed
" Color: green Green 10 Green
" Color: lightgrey LightGrey 7 LightGrey
" Color: red Red 9 Red
" Color: white White 15 White
" Color: darkyellow DarkYellow 3 DarkYellow
" Color: darkgrey DarkGrey 8 DarkGrey
" Color: s_steelgray #262335 8 DarkGray
" Color: s_white #ECEBED 7 LightGray
" Color: s_tolopea #2C2540 7 LightGray
" Color: s_oslogray #888690 7 LightGray
" Color: s_lightgray #D4D3D7 7 LightGray
" Color: s_yellow #FEDE5D 11 Yellow
" Color: s_governorbay #495495 14 Cyan
" Color: s_grape #3E3B4B 8 DarkGray
" Color: s_red #E55A5E 9 Red
" Color: s_lightred #EB8F82 224 LightRed
" Color: s_magenta #D884C7 13 Magenta
" Color: s_orange #EA9652 224 LightRed
" Color: s_green #90DEB6 121 LightGreen
" Term Colors: black darkred darkgreen darkyellow darkblue darkmagenta darkcyan lightgrey
" Term Colors: darkgrey red green s_yellow blue s_magenta cyan white
" Background: dark
" vim: et ts=2 sw=2

View File

@ -1,537 +0,0 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Alicia Sykes's Vim Config for *nix systems
"
" Heavily inspired by:
" Amir Salihefendic (@amix3k): https://github.com/amix/vimrc
"
" Sections:
" -> General
" -> VIM user interface
" -> Colors and Fonts
" -> Files and backups
" -> Text, tab and indent related
" -> Visual mode related
" -> Moving around, tabs and buffers
" -> Status line
" -> Editing mappings
" -> Searching and cope displaying
" -> Spell checking
" -> Misc
" -> Helper functions
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" File encodings
set fileencoding=utf-8
set fileencodings=utf-8
" Set title
set title
" Set file formats for OS
set fileformats=unix
" Default Shell
set shell=/bin/zsh
" Sets how many lines of history VIM has to remember
set history=500
" Sets how many undo actions VIM will remember
set undolevels=100
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
au FocusGained,BufEnter * checktime
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
" Fast saving
nmap <leader>w :w!<cr>
" :W sudo saves the file
" (useful for handling the permission-denied error)
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
" Normal OS clipboard interaction
set clipboard+=unnamedplus
" Remember info about open buffers on close
set viminfo^=
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7
" Avoid garbled characters in Chinese language windows OS
let $LANG='en'
set langmenu=en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" Turn on the Wild menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
set wildignore+=.git\*,.hg\*,.svn\*
else
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif
"Always show current position
set ruler
" Height of the command bar
set cmdheight=1
" A buffer becomes hidden when it is abandoned
set hid
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Properly disable sound on errors on MacVim
if has("gui_macvim")
autocmd GUIEnter * set vb t_vb=
endif
" Add a bit extra margin to the left
set foldcolumn=1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable
" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
set background=dark
" Set extra options when running in GUI mode
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
" Set font to Hack
set guifont=Hack:h20
set guifont=Monospace:h20
" Set color schemes, when availible
augroup colorscheme_customization
au!
if has('termguicolors')
set termguicolors
endif
if has_key(g:plugs, 'dracula')
let g:_bold = 1
let g:dracula_italic = 1
let g:dracula_colorterm = 0
colorscheme dracula
if has_key(g:plugs, 'vim-airline')
let g:airline_theme = 'dracula'
call airline#load_theme() | call airline#update_statusline()
endif
endif
augroup END
colorscheme synthwave
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git etc. anyway...
set nobackup
set nowb
set noswapfile
" Persistent undo, for making more 'u' operations
if has('persistent_undo')
set undodir=~/.vim/undodir
set undofile
set undolevels=1000
set undoreload=10000
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Do not wrap lines
set nowrap
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set smarttab
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
" Indentation settings
set autoindent
set copyindent
""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
" Show linenumbers
set number relativenumber
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
set ruler
" Enable folding
set foldmethod=indent
set foldlevel=99
nnoremap <Space> za
vnoremap <Space> za
" Make whitespaces, tabs visible
set list
set listchars-=nbsp:+
set listchars-=trail-
set listchars+=trail:•,nbsp:~,eol:↵
highlight BadWhitespace ctermbg=red guibg=red
" Splitting windows settings
set splitbelow
set splitright
" Open Vim help verically
augroup help_vertical
au!
command! -nargs=* -complete=help Help vertical belowright help <args>
autocmd FileType help wincmd L
augroup END
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <C-space> ?
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" Quicker way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" Quicker resizing with arrows
nnoremap <silent> <C-Left> :vertical resize +2<CR>
nnoremap <silent> <C-Right> :vertical resize -2<CR>
nnoremap <silent> <C-Up> :resize +2<CR>
nnoremap <silent> <C-Down> :resize -2<CR>
" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT
" Close all the buffers
map <leader>ba :bufdo bd<cr>
map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>
" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <C-r>=expand("%:p:h")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab,newtab
set stal=2
catch
endtry
" Make the keyboard faster
set ttyfast
set timeout timeoutlen=1000 ttimeoutlen=50
" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
" Ignore encoded, irrelevant or temp files while searching
set wildignore+=*.BACKUP.*,*.BASE.*,*.LOCAL.*,*.REMOTE.*
set wildignore+=/tmp/**
set wildignore=*.o,*.obj,*~,*.exe,*.a,*.pdb,*.lib
set wildignore+=*.so,*.dll,*.swp,*.egg,*.jar,*.class,*.pyc,*.pyo,*.bin,*.dex
set wildignore+=*.log,*.pyc,*.sqlite,*.sqlite3,*.min.js,*.min.css,*.tags
set wildignore+=*.zip,*.7z,*.rar,*.gz,*.tar,*.gzip,*.bz2,*.tgz,*.xz
set wildignore+=*.png,*.jpg,*.gif,*.bmp,*.tga,*.pcx,*.ppm,*.img,*.iso
set wildignore+=*.pdf,*.dmg,*.app,*.ipa,*.apk,*.mobi,*.epub
set wildignore+=*.mp4,*.avi,*.flv,*.mov,*.mkv,*.swf,*.swc
set wildignore+=*.ppt,*.pptx,*.doc,*.docx,*.xlt,*.xls,*.xlsx,*.odt,*.wps
set wildignore+=*/.git/*,*/.svn/*,*.DS_Store
set wildignore+=*/node_modules/*,*/nginx_runtime/*,*/build/*,*/logs/*,*/dist/*,*/tmp/*
set wildignore+=*/.aws-sam/*
set wildmode=longest:full,full
set wildmenu
" Nerd-Tree Options
let g:netrw_banner=1
let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
" Navigate through buffers
nnoremap <silent> <Tab> :bnext<CR>
nnoremap <silent> <S-Tab> :bprevious<CR>
nnoremap <silent> <leader>q :bd<cr>gT
nnoremap <silent> <leader>Q :bufdo bd<CR>
nnoremap <silent> <leader>r :e<CR>
nnoremap <silent> <leader>R :e!<CR>
" Tabs keybindings
map <C-t><up> :tabr<cr>
map <C-t><down> :tabl<cr>
map <C-left> :tabp<cr>
map <C-right> :tabn<cr>
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap VIM 0 to first non-blank character
map 0 ^
" Move a line of text using ALT+[jk] or Command+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
if has("mac") || has("macunix")
nmap <D-j> <M-j>
nmap <D-k> <M-k>
vmap <D-j> <M-j>
vmap <D-k> <M-k>
endif
" Delete trailing white space on save, useful for some filetypes ;)
fun! CleanExtraSpaces()
let save_cursor = getpos(".")
let old_query = getreg('/')
silent! %s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfun
if has("autocmd")
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces()
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Searching
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" make searching smart
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --vimgrep
set grepformat^=%f:%l:%c:%m
endif
set ignorecase
set smartcase
" Center the screen when advancing to next match
nnoremap n nzzzv
nnoremap N Nzzzv
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Quickly open a buffer for scribble
map <leader>q :e ~/buffer<cr>
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
endif
return ''
endfunction
" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum)
endif
endfunction
function! CmdLine(str)
call feedkeys(":" . a:str)
endfunction
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", "\\/.*'$^~[]")
if a:direction == 'gv'
call CmdLine("Ack '" . l:pattern . "' " )
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
" The End :)

View File

@ -1,51 +0,0 @@
scriptencoding utf-8
set fileformats=unix,dos,mac
augroup git_ft_config
au!
au BufNewFile,BufRead gitconfig setlocal ft=gitconfig nolist nospell ts=4 sw=4 noet
au BufNewFile,BufRead .gitconfig* setlocal ft=gitconfig nolist nospell ts=4 sw=4 noet
au FileType gitcommit setlocal nospell
augroup END
augroup js_ft_settings
au!
au BufRead,BufNewFile *.js,*.jsx set et ai ts=4 sts=4 sw=4 tw=79
au BufRead,BufNewFile *.js,*.jsx match BadWhitespace /^\t\+/
au BufRead,BufNewFile *.js,*.jsx match BadWhitespace /\s\+$/
au BufNewFile *.js,*.jsx set fileformat=unix
au BufRead,BufNewFile *.js,*.jsx let b:comment_leader = '//'
augroup END
augroup sh_ft_settings
au!
au BufNewFile,BufRead *.sh setlocal ai et ts=2 sw=2 sts=2
augroup END
augroup vim_ft_settings
au!
au BufNewFile,BufRead *.vim setlocal ai et ts=2 sw=2 sts=2
augroup END
augroup text_ft_settings
au!
au BufNewFile,BufRead *.txt setlocal et ts=4 sw=4
augroup END
augroup cpp_ft_settings
au!
au BufNewFile,BufRead *.cpp setlocal et ts=2 sw=2
au BufNewFile,BufRead *.hpp setlocal et ts=2 sw=2
augroup END
augroup json_ft_settings
au!
au FileType json setlocal foldmethod=syntax
au BufNewFile,BufRead *.json setlocal et ts=2 sw=2
augroup END
augroup asciidoc_ft_settings
au!
au FileType asciidoc setlocal spell
augroup END

View File

@ -1,8 +0,0 @@
" vint: -ProhibitAutocmdWithNoGroup
" Dockerfile
autocmd BufRead,BufNewFile [Dd]ockerfile set ft=Dockerfile
autocmd BufRead,BufNewFile Dockerfile* set ft=Dockerfile
autocmd BufRead,BufNewFile [Dd]ockerfile.vim set ft=vim
autocmd BufRead,BufNewFile *.dock set ft=Dockerfile
autocmd BufRead,BufNewFile *.[Dd]ockerfile set ft=Dockerfile

View File

@ -1,4 +0,0 @@
augroup cfn
au BufRead,BufNewFile template.yml set filetype=yaml.cloudformation
au BufRead,BufNewFile *.template.yml set filetype=yaml.cloudformation
augroup END

View File

@ -1,4 +0,0 @@
" vint: -ProhibitAutocmdWithNoGroup
" docker-compose.yml
autocmd BufRead,BufNewFile docker-compose*.{yaml,yml}* set ft=yaml.docker-compose

View File

@ -1,4 +0,0 @@
augroup sshconfig_ft
au BufNewFile,BufRead *ssh/config setfiletype sshconfig
au BufNewFile,BufRead *ssh/config.d/*.config setfiletype sshconfig
augroup END

View File

@ -1,33 +0,0 @@
" Define comment string
setlocal commentstring=#\ %s
" Enable automatic comment insertion
setlocal formatoptions+=cro
function! DockerfileReplaceInstruction(original, replacement)
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
let word = a:replacement
else
let word = a:original
endif
let g:UnduBuffer = a:original
return word
endfunction
inoreabbr <silent> <buffer> from <C-R>=DockerfileReplaceInstruction("from", "FROM")<CR>
inoreabbr <silent> <buffer> maintainer <C-R>=DockerfileReplaceInstruction("maintainer", "MAINTAINER")<CR>
inoreabbr <silent> <buffer> run <C-R>=DockerfileReplaceInstruction("run", "RUN")<CR>
inoreabbr <silent> <buffer> cmd <C-R>=DockerfileReplaceInstruction("cmd", "CMD")<CR>
inoreabbr <silent> <buffer> label <C-R>=DockerfileReplaceInstruction("label", "LABEL")<CR>
inoreabbr <silent> <buffer> expose <C-R>=DockerfileReplaceInstruction("expose", "EXPOSE")<CR>
inoreabbr <silent> <buffer> env <C-R>=DockerfileReplaceInstruction("env", "ENV")<CR>
inoreabbr <silent> <buffer> add <C-R>=DockerfileReplaceInstruction("add", "ADD")<CR>
inoreabbr <silent> <buffer> copy <C-R>=DockerfileReplaceInstruction("copy", "COPY")<CR>
inoreabbr <silent> <buffer> entrypoint <C-R>=DockerfileReplaceInstruction("entrypoint", "ENTRYPOINT")<CR>
inoreabbr <silent> <buffer> volume <C-R>=DockerfileReplaceInstruction("volume", "VOLUME")<CR>
inoreabbr <silent> <buffer> user <C-R>=DockerfileReplaceInstruction("user", "USER")<CR>
inoreabbr <silent> <buffer> workdir <C-R>=DockerfileReplaceInstruction("workdir", "WORKDIR")<CR>
inoreabbr <silent> <buffer> arg <C-R>=DockerfileReplaceInstruction("arg", "ARG")<CR>
inoreabbr <silent> <buffer> onbuild <C-R>=DockerfileReplaceInstruction("onbuild", "ONBUILD")<CR>
inoreabbr <silent> <buffer> stopsignal <C-R>=DockerfileReplaceInstruction("stopsignal", "STOPSIGNAL")<CR>

View File

@ -1,5 +0,0 @@
" Define comment string
setlocal commentstring=#\ %s
" Enable automatic comment insertion
setlocal formatoptions+=cro

View File

@ -1,7 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
set spell
set spelllang=en

View File

@ -1,19 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let b:ale_linters = ['go build', 'gometalinter', 'gopls']
let b:ale_fixers = ['gofmt', 'goimports', 'trim_whitespace']
setlocal noexpandtab
setlocal shiftwidth=4
setlocal softtabstop=4
setlocal tabstop=4
setlocal nolisp
setlocal autoindent
setlocal nospell
set makeprg=go " point :make to go binary

View File

@ -1,67 +0,0 @@
" make Vim recognize ES6 import statements
let &l:include = 'from\|require'
" allow Vim to parse path aliases such as ~/components or @/components
" which are common in Vue projects
setlocal isfname+=@-@
setlocal suffixesadd+=.vue
let &l:includeexpr = "path#resolve_alias(['~', '@'], ['src', 'app'], v:fname)"
" make Vim use ES6 export statements as define statements
let &l:define = '\v(export\s+(default\s+)?)?(var|let|const|(async\s+)?function|class)|export\s+'
setlocal textwidth=80
" define convenience sniplets
let s:snippets_map={
\ "log": "console.log(",
\ "warn": "console.warn(",
\ "json": "JSON.stringify",
\ "jlog": "console.log(JSON.stringify(, null, 2))\<C-o>2F,",
\ "fn": "() => {}",
\ "if": "if () {\<CR>\<C-o>k\<C-o>f)",
\ "ifelse": "if () {\<CR>\<C-o>j else {\<CR>\<C-o>3k\<C-o>f)",
\ "try": "try {\<CR>\<C-o>j catch (error) {\<CR>\<C-o>{\<C-f>",
\ "tryf": "try {\<CR>\<C-o>j catch (error) {\<CR>\<C-o>j finally {\<CR>\<C-o>2{\<C-f>",
\ "pobj": "PropTypes.object",
\ "pfn": "PropTypes.func",
\ "parr": "PropTypes.arrayOf(",
\ "pstr": "PropTypes.string",
\ "pbool": "PropTypes.bool",
\ "pshape": "PropTypes.shape({",
\ "pnum": "PropTypes.number",
\ "pany": "PropTypes.any",
\ "pnode": "PropTypes.node",
\ "pone": "PropTypes.oneOf([",
\ "ptypes": "static propTypes = {",
\ "defprops": "static defaultProps = {",
\ "ctypes": "static contextTypes = {",
\ "constructor": "constructor(props) {
super(props);",
\ "cwm": "componentWillMount() {",
\ "cdm": "componentDidMount() {",
\ "scu": "shouldComponentUpdate(nextProps, nextState) {",
\ "cwrp": "componentWillReceiveProps(nextProps) {",
\ "cwu": "componentWillUpdate() {",
\ "cdu": "componentDidUpdate() {",
\ "cwum": "componentWillUnmount() {",
\ }
for [s:pattern, s:expansion] in items(s:snippets_map)
execute "ISnipletBuffer" s:pattern s:expansion
endfor
CSnipletBuffer json JSON.stringify
CSnipletBuffer warn console.warn
CSnipletBuffer log console.log
" define convenience map for destructuring
inoremap <buffer> <C-@>xx ;<C-o>Bconst {} = <C-o>F}<Space><Space><Left>
inoremap <buffer> <C-@>xi ';<C-o>B'<Left>import {} from <C-o>F}
" define convenience map for passing down handler props
inoremap <buffer> <C-@>xp <C-o>"zyiw<C-r>z={<End>}
\<C-o>:keeppatterns s/handle/on<CR><End>
" allow filename completion with import * from ../<C-x><C-f>
call cwd#ChangeOnInsert()

View File

@ -1,18 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal spell
setlocal expandtab
setlocal tabstop=4
setlocal shiftwidth=4
setlocal textwidth=99
" spellcheck
setlocal spell
" generate TOC quicker
nmap <buffer> <silent> <Leader>toc :GenTocGFM<CR>
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'prettier']

View File

@ -1,67 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal expandtab
setlocal autoindent
setlocal smartindent
setlocal textwidth=79
setlocal tabstop=4
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal fileformat=unix
set backspace=indent,eol,start
match BadWhitespace /^\t\+/
match BadWhitespace /\s\+$/
let b:comment_leader = '#'
let b:ale_fix_on_save = 0
let b:ale_linters = ['mypy', 'flake8']
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines']
if isdirectory($VIRTUAL_ENV)
let s:yapf_bin = expand($VIRTUAL_ENV.'/bin/yapf')
let s:black_bin = expand($VIRTUAL_ENV.'/bin/black')
if executable(s:black_bin)
call add(b:ale_fixers, 'black')
elseif executable(s:yapf_bin)
call add(b:ale_fixers, 'yapf')
endif
elseif executable('yapf')
call add(b:ale_fixers, 'yapf')
elseif executable('black')
call add(b:ale_fixers, 'black')
endif
" if enabled, it makes flake8 loose its configuration file in project root
let b:ale_python_flake8_change_directory = 0
" always load pyls from neovim3 virtualenv :)
let b:ale_python_pyls_executable = expand(fnamemodify(g:python3_host_prog, ':h') . '/' . 'pyls')
if executable(b:ale_python_pyls_executable)
call add(b:ale_linters, 'pyls')
let b:ale_python_pyls_config = {
\ 'pyls': {
\ 'plugins': {
\ 'flake8': {'enabled': v:true},
\ 'mypy': {'enabled': v:true},
\ 'yapf': {'enabled': v:true},
\ 'pyflakes': {'enabled': v:false},
\ 'pycodestyle': {'enabled': v:false},
\ 'jedi': {'enabled': v:true},
\ 'rope': {'enabled': v:true},
\ 'jedi_definition': {
\ 'follow_imports': v:true,
\ 'follow_builtin_imports': v:true,
\ },
\ }
\ }}
endif

View File

@ -1,13 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal autoindent
setlocal expandtab
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2
" ale fixer settings
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'prettier']

View File

@ -1 +0,0 @@
runtime! ftplugin/typescript.vim

View File

@ -1,21 +0,0 @@
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
compiler typescript
setlocal commentstring=//\ %s
" Set 'formatoptions' to break comment lines but not other lines,
" " and insert the comment leader when hitting <CR> or using "o".
setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd+=.ts,.tsx
let b:undo_ftplugin = "setl fo< ofu< com< cms<"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,11 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal tabstop=2
setlocal softtabstop=2
setlocal shiftwidth=2
let b:ale_fix_on_save = 1
let b:ale_fixers = ['prettier', 'trim_whitespace', 'remove_trailing_lines']

View File

@ -1,38 +0,0 @@
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal expandtab
setlocal tabstop=2
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal foldmethod=indent
setlocal nowrap
setlocal indentexpr=GetYamlIndent()
setlocal indentkeys=o,O,*<Return>,!^F
function! GetYamlIndent()
let prevlnum = v:lnum - 1
if prevlnum == 0
return 0
endif
let line = substitute(getline(v:lnum),'\s\+$','','')
let prevline = substitute(getline(prevlnum),'\s\+$','','')
let indent = indent(prevlnum)
let increase = indent + &shiftwidth
let decrease = indent - &shiftwidth
if prevline =~# ':$'
return increase
elseif prevline =~# '^\s\+\-' && line =~# '^\s\+[^-]\+:'
return decrease
else
return indent
endif
endfunction
let b:ale_linters = ['yamllint', 'cloudformation']
let b:ale_fixers = ['trim_whitespace', 'remove_trailing_lines', 'prettier']

View File

@ -1,23 +0,0 @@
if exists('b:did_indent') | finish | endif
let b:did_indent = 1
function! DockerfileIndent(line)
let prev_line = getline(a:line - 1)
if a:line > 1 && prev_line =~ '\\\s*$'
let i = indent(a:line - 1)
if i == 0
let i += &l:shiftwidth
if &l:expandtab && prev_line =~# '^RUN\s'
" Overindent past RUN
let i = 4 + &l:shiftwidth
endif
endif
return i
endif
return -1
endfunction
set indentexpr=DockerfileIndent(v:lnum)

@ -1 +0,0 @@
Subproject commit 2386923a8c30d0c4f06f27eef2a025752423ea86

@ -1 +0,0 @@
Subproject commit 0459df8a0bbfc8ef1bfd88db889e881626f65914

@ -1 +0,0 @@
Subproject commit 1773a496ad39fdd3d904679955b39357f3f38442

@ -1 +0,0 @@
Subproject commit 1d288281586d1e6b52646a4c412df3dd3a2fe231

@ -1 +0,0 @@
Subproject commit 27af4ab2de157f80c8a8391aebb60061318814ea

@ -1 +0,0 @@
Subproject commit e7154372adc95d637ccd911c2f8601d9ff2eac1f

@ -1 +0,0 @@
Subproject commit 02a192ea0bed22a015e005b281e55e0da2a8e496

@ -1 +0,0 @@
Subproject commit 25e2547fb0566460f5999024f7a0de7b3775201f

@ -1 +0,0 @@
Subproject commit 6aaddfde21fe9e7acbe448b92b3cbb67f2fe1fc1

@ -1 +0,0 @@
Subproject commit b83e9cdf835161b398e04e4c462103fd21801ee3

@ -1 +0,0 @@
Subproject commit 3a9d533f3de86a43b69f6c47d3394c0d866fdb08

@ -1 +0,0 @@
Subproject commit f21506f8cd9ae8a21bb82fcb67830e5e29d186c5

@ -1 +0,0 @@
Subproject commit a86fea904d8d54413e590a05bb2174fda0cee98d

@ -1 +0,0 @@
Subproject commit d97a664b9adbd1a0a9cba6c1c3baf071a1059d1e

@ -1 +0,0 @@
Subproject commit 7e8aeb69709b73cdbdaf50f4d26ab45d7920b7f0

@ -1 +0,0 @@
Subproject commit c01977d027de854c6a85ed5c57915a7e8848f4b9

@ -1 +0,0 @@
Subproject commit 8dd7f1bf25acee493a5114e627ea90a9850c5fa8

@ -1 +0,0 @@
Subproject commit 0329d89c5114dc285939050fd5777dbcc450ddd7

@ -1 +0,0 @@
Subproject commit 8cf0cf5bfb2b858faecf4e0f6c1b8d0948805e5e

@ -1 +0,0 @@
Subproject commit 4be54a3e2e300a94f6f7dfa7a6ee9e81245c9886

@ -1 +0,0 @@
Subproject commit 2e3cd54ed696500bb3722226f2103d4b279272c0

@ -1 +0,0 @@
Subproject commit cb4c622c97a39652151748c4dec70a46e93a9117

@ -1 +0,0 @@
Subproject commit 50705e8ebb7038b31314f416d1bddd9cb9154049

@ -1 +0,0 @@
Subproject commit 3c90d0cc37bb8b78422f647e62587f498a5dd7bd

@ -1 +0,0 @@
Subproject commit 3727f089410e23ae113be6222e8a08dd2613ecf2

@ -1 +0,0 @@
Subproject commit 6989f1663cc03d7da72b5ef1c03f87e6ddb70b41

@ -1 +0,0 @@
Subproject commit 772de97c97d37e5e22d7bd6884b17b858a687bc2

@ -1 +0,0 @@
Subproject commit 52b3ec1ee8d0f78c69bae6cc32f3c2d1a023a8c8

@ -1 +0,0 @@
Subproject commit fcc1401c2f783c14314ef22517a525a884c549ac

@ -1 +0,0 @@
Subproject commit 10fd0aa57d176718bc2c570f121ab523c4429a25

@ -1 +0,0 @@
Subproject commit f51a26d3710629d031806305b6c8727189cd1935

@ -1 +0,0 @@
Subproject commit 77d0b89fe5648d0881e8506d1949a9412201772b

@ -1 +0,0 @@
Subproject commit 0e55bb4054cdd5eefc0bb870f3e3c249673817cb

@ -1 +0,0 @@
Subproject commit 3ea06b623d2234d75a33fed787b9a07a64fff9b2

@ -1 +0,0 @@
Subproject commit 3e76c81f329cb13b563b9092fb0e5097151bb08b

@ -1 +0,0 @@
Subproject commit 6104b30b32732e367266f06ecf6e817df32ac1b9

@ -1 +0,0 @@
Subproject commit d7c3e1c2fd73983dd4318b4646da39401529fefa

View File

@ -1,280 +0,0 @@
scriptencoding utf-8
" © Alicia Sykes <https://aliciasykes.com> 2021 Licensed under MIT
" Initiate Plugins
call plug#begin('~/.vim/plugged')
" Layout and Navigation
Plug 'vim-airline/vim-airline'
Plug 'preservim/nerdtree'
Plug 'andymass/vim-matchup'
Plug 'preservim/tagbar'
Plug 'ludovicchabant/vim-gutentags'
Plug '~/.fzf'
Plug 'junegunn/fzf.vim'
Plug 'psliwka/vim-smoothie'
Plug 'ryanoasis/vim-devicons'
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim', { 'do': '!pip install --user --upgrade neovim' }
endif
" Text Operations
Plug 'preservim/nerdcommenter'
Plug 'dense-analysis/ale'
Plug 'tpope/vim-surround'
Plug 'haya14busa/incsearch.vim'
Plug 'mg979/vim-visual-multi'
Plug 'triglav/vim-visual-increment'
Plug 'janko/vim-test'
Plug 'vim-syntastic/syntastic'
" Git
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
Plug 'rhysd/committia.vim'
Plug 'tpope/vim-git'
" Specific File Types
Plug 'pangloss/vim-javascript', { 'for': ['javascript'] }
Plug 'HerringtonDarkholme/yats.vim', { 'for': ['typescript'] }
Plug 'MaxMEllon/vim-jsx-pretty', { 'for': ['jsx', 'tsx'] }
Plug 'ap/vim-css-color', { 'for': ['css', 'scss', 'sass'] }
Plug 'mustache/vim-mustache-handlebars', {'for': ['mustache', 'handlebars', 'html']}
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'vim-scripts/indentpython.vim', {'for': ['python']}
Plug 'tmhedberg/SimpylFold', {'for': ['python']}
Plug 'lervag/vimtex', { 'for': ['tex'] }
Plug 'ekalinin/Dockerfile.vim', { 'for': ['dockerfile', 'docker-compose', 'Dockerfile'], 'do': 'make install' }
Plug 'elzr/vim-json', {'for': ['json']}
Plug 'raimon49/requirements.txt.vim', {'for': ['requirements']}
Plug 'gabrielelana/vim-markdown', {'for': ['markdown']}
Plug 'zinit-zsh/zinit-vim-syntax'
Plug 'chr4/nginx.vim'
if has('nvim')
Plug 'numirias/semshi', {'for': ['python'], 'do': ':UpdateRemotePlugins' }
endif
" Themes
Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()
" Plugin Configuration
" =====================
augroup vim_test_settings
autocmd!
let g:test#strategy = 'neovim'
let g:test#neovim#term_position = 'vertical'
" Integrate with coverage tool
let g:test#python#pytest#options = '--cov-branch --cov-context=test'
" disable vim-projectionist
let g:test#no_alternate = 1
nmap <silent> <C-t>n :TestNearest<CR>
nmap <silent> <C-t>f :TestFile<CR>
nmap <silent> <C-t>s :TestSuite<CR>
nmap <silent> <C-t>l :TestLast<CR>
nmap <silent> <C-t>v :TestVisit<CR>
augroup end
augroup tagbar_plugin_settins
autocmd!
let g:tagbar_ctags_bin='ctags'
let g:tagbar_iconchars = ['►', '▼']
let g:tagbar_autoclose = 1
let g:tagbar_type_markdown = {
\ 'ctagstype' : 'markdown',
\ 'kinds' : [
\ 'h:headings',
\ 'l:links',
\ 'i:images'
\ ],
\ }
let g:tagbar_type_sh = {
\ 'ctagstype' : 'sh',
\ 'kinds' : [
\ 'f:functions',
\ 'v:variables',
\ ],
\ }
let g:tagbar_type_elm = {
\ 'ctagstype' : 'elm',
\ 'kinds' : [
\ 'm:module',
\ 'i:imports',
\ 't:types',
\ 'C:constructors',
\ 'c:constants',
\ 'f:functions',
\ 'p:ports'
\ ],
\ }
let g:tagbar_type_ansible = {
\ 'ctagstype' : 'ansible',
\ 'kinds' : [
\ 't:tasks'
\ ],
\ }
nmap <F8> :TagbarToggle<CR>
augroup END
if has_key(g:plugs, 'vim-airline')
augroup airline_plugin_settings
autocmd!
let g:airline_powerline_fonts = 1
let g:airline_left_sep='' " Slightly fancier than '>'
let g:airline_right_sep='' " Slightly fancier than '<'
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
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#buffer_nr_format = '%s '
let g:airline#extensions#tabline#buffer_nr_show = 1
augroup END
endif
" Commit Msg
let g:committia_hooks = {}
function! g:committia_hooks.edit_open(info)
" Scroll the diff window from insert mode
" Map <C-n> and <C-p>
imap <buffer><C-n> <Plug>(committia-scroll-diff-down-half)
imap <buffer><C-p> <Plug>(committia-scroll-diff-up-half)
endfunction
" Python
let python_highlight_all = 1
let g:pyenv#auto_create_ctags = 1
let g:pyenv#auto_assign_ctags = 1
" Gutter
augroup gitgutter_options
autocmd!
let g:gitgutter_diff_args = '-w' " ignore whitespace changes
let g:gitgutter_sign_added = ''
let g:gitgutter_sign_modified = ''
let g:gitgutter_sign_modified_removed = ''
let g:gitgutter_sign_removed = ''
let g:gitgutter_sign_removed_first_line = ''
let g:gitgutter_highlight_linenrs = 1
nmap <A-,> <Plug>(GitGutterUndoHunk)
nmap <A-.> <Plug>(GitGutterStageHunk)
nmap <A-/> <Plug>(GitGutterPreviewHunk)
augroup END
augroup incremental_search_options
autocmd!
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
" automatically turn off hlsearch
set hlsearch
let g:incsearch#auto_nohlsearch = 1
" and deal in some mappings
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
" do not persist search end
let g:incsearch#do_not_save_error_message_history = 1
" different highlight colors
let g:incsearch#separate_highlight = 1
augroup END
augroup gutentags_options
autocmd!
let g:gutentags_ctags_tagfile = '.git/tags'
let g:gutentags_file_list_command = {
\ 'markers': {
\ '.git': 'git grep --cached -I -l -e $""',
\ },
\ }
augroup END
if has_key(g:plugs, 'fzf.vim')
augroup fzf_settings
autocmd!
" fzf mappings
nmap <Leader>t :Tags<CR>
nmap <Leader>bt :BTags<CR>
nmap <Leader>f :GFiles<CR>
nmap <Leader>F :Files<CR>
nmap <Leader>c :Commits<CR>
nmap <Leader>b :Buffers<CR>
nmap <leader><tab> <plug>(fzf-maps-n)
xmap <leader><tab> <plug>(fzf-maps-x)
omap <leader><tab> <plug>(fzf-maps-o)
" floating window
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
augroup END
" ale settings
augroup ale_plugin_settings
autocmd!
let g:ale_fix_on_save = 1 " run on save
let g:ale_lint_on_save = 1 " 2 options allow to lint only when file is saved
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 1 " lint when entering the buffer
let g:ale_completion_enabled = 0 " do not mix up stuff with deoplete
let g:ale_sign_error = '✖' " error sign
let g:ale_sign_warning = '⚠' " warning sign
let g:ale_fixers = ['trim_whitespace', 'remove_trailing_lines']
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_set_balloons = 1
nmap <A-f> <Plug>(ale_fix)<CR>
nmap <A-l> <Plug>(ale_lint)<CR>
nmap <A-d> <Plug>(ale_detail)<CR>
nmap <A-k> <Plug>(ale_previous_wrap)
nmap <A-j> <Plug>(ale_next_wrap)
nmap <F3> <Plug>(ale_hover)
nmap <F4> <Plug>(ale_go_to_definition)
if has('nvim')
autocmd VimEnter *
\ set updatetime=1000 |
\ let g:ale_lint_on_text_changed = 0
autocmd CursorHold * call ale#Queue(0)
autocmd CursorHoldI * call ale#Queue(0)
autocmd InsertEnter * call ale#Queue(0)
autocmd InsertLeave * call ale#Queue(0)
endif
augroup END
endif

View File

@ -1,67 +0,0 @@
snippet F
FROM ${1:ubuntu}
snippet f
FROM ${1:ubuntu}
snippet M
LABEL maintainer="${1:name}"
snippet m
LABEL maintainer="${1:name}"
snippet R
RUN ${1:command}
snippet r
RUN ${1:command}
snippet C
CMD ${1:command}
snippet c
CMD ${1:command}
snippet CP
COPY ${1:src} ${2:dest}
snippet cp
COPY ${1:src} ${2:dest}
snippet EXP
EXPOSE ${1:port}
snippet exp
EXPOSE ${1:port}
snippet E
ENV ${1:key} ${2:value}
snippet e
ENV ${1:key} ${2:value}
snippet A
ADD ${1:src} ${2:dst}
snippet a
ADD ${1:src} ${2:dst}
snippet ENT
ENTRYPOINT ${1:command}
snippet ent
ENTRYPOINT ${1:command}
snippet V
VOLUME ["${1:path}"]
snippet v
VOLUME ["${1:path}"]
snippet U
USER ${1:name}
snippet u
USER ${1:name}
snippet W
WORKDIR ${1:path}
snippet w
WORKDIR ${1:path}
snippet upd
# update packages
RUN echo "deb http://archive.ubuntu.com/ubuntu ${1:precise} main universe" > /etc/apt/sources.list; \
apt-get update && apt-get -y upgrade; \
${2}
;rm -rf /var/lib/apt/lists/*
snippet head
# ${1:Description}
#
# VERSION ${2:0.1.0}
${3}
snippet O
ONBUILD ${1}
snippet o
ONBUILD ${1}
snippet L
LABEL ${1:label}="${2:value}"
snippet l
LABEL ${1:label}="${2:value}"

View File

@ -1,166 +0,0 @@
snippet ve
version: '${1:3}'
snippet volumes
volumes:
- ${1:value}
snippet volume_
volume_driver: ${1:driver}
snippet volumes_
volumes_from:
- ${1:name}
snippet exter
external: ${1:boolean}
snippet ser
services:
${1:name}
snippet bu
build:
${1:value}
snippet conte
context: ${1:dir}
snippet com
command: ${1:command}
snippet dep
depends_on:
${1:value}
snippet env
environment:
${1:name}: ${2:value}
snippet doc
dockerfile: ${1:file}
snippet ar
args:
${1:name}: ${2:value}
snippet cap_a
cap_add:
- ${1:value}
snippet cap_d
cap_drop:
- ${1:value}
snippet cgr
cgroup_parent: ${1:cgroup}
snippet conta
container_name: ${1:name}
snippet dev
devices:
- ${1:value}
snippet dn
dns:
- ${1:ip}
snippet dns_
dns_search:
- ${1:ip}
snippet tm
tmpfs:
- ${1:dir}
snippet ent
entrypoint: ${1:command}
snippet env_
env_file:
- ${1:file}
snippet exp
expose:
- ${1:port}
snippet exten
extends:
file: ${1:file}
service: ${2:name}
snippet extr
extra_hosts:
- ${1:host}:${2:ip}
snippet gr
group_add:
- ${1:name}
snippet im
image: ${1:image}
snippet la
labels:
${1:dns}: ${2:label}
snippet links
links:
- ${1:name}
snippet logg
logging:
driver: ${1:driver}
options:
${2:value}
snippet log_d
log_driver: ${1:driver}
snippet log_o
log_opt:
${1:value}
snippet net
net: ${1:value}
snippet network_
network_mode: ${1:value}
snippet networks
networks:
- ${1:value}
snippet al
networks:
- ${1:name}
snippet ipv4
ipv4_address: ${1:ip}
snippet ipv6
ipv6_address: ${1:ip}
snippet link_
link_local_ips:
- ${1:ip}
snippet pi
pid: ${1:host}
snippet po
ports:
- ${1:value}
snippet sec
security_opt:
- ${1:value}
snippet sto
stop_signal: ${1:signal}
snippet ul
ulimits:
${1:value}
snippet cpu_s
cpu_shares: ${1:value}
snippet cpu_q
cpu_quota: ${1:value}
snippet cpus
cpuset: ${1:value}
snippet dom
domainname: ${1:name}
snippet ho
hostname: ${1:name}
snippet ipc
ipc: ${1:host}
snippet mem_
mem_limit: ${1:value}
snippet mems
memswap_limit: ${1:value}
snippet pr
privileged: ${1:boolean}
snippet oom
oom_score_adj: ${1:value}
snippet res
restart: ${1:value}
snippet us
user: ${1:value}
snippet wo
working_dir: ${1:dir}
snippet rea
read_only: ${1:boolean}
snippet sh
shm_size: ${1:value}
snippet std
stdin_open: ${1:boolean}
snippet tt
tty: ${1:boolean}
snippet driver
driver: ${1:value}
snippet driver_
driver_opts:
${1:key}: ${2:value}
snippet ipa
ipam:
${1:value}
snippet hc
healthcheck:
test: ${1:command}

View File

@ -1,7 +0,0 @@
whitelist
keypair
keypairs
github
dracula
UI
json

View File

@ -1,59 +0,0 @@
" Vim syntax file
" Language: Dockerfile
" Maintainer: Eugene Kalinin
" Latest Revision: 11 September 2013
" Source: http://docs.docker.io/en/latest/use/builder/
if exists("b:current_syntax")
finish
endif
" case sensitivity (fix #17)
" syn case ignore
" Keywords
syn keyword dockerfileKeywords FROM AS MAINTAINER RUN CMD COPY
syn keyword dockerfileKeywords EXPOSE ADD ENTRYPOINT
syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD
syn keyword dockerfileKeywords LABEL ARG HEALTHCHECK SHELL STOPSIGNAL
" Bash statements
setlocal iskeyword+=-
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
syn keyword bashStatement wget gzip
" Strings
syn region dockerfileString start=/"/ skip=/\\"|\\\\/ end=/"/
syn region dockerfileString1 start=/'/ skip=/\\'|\\\\/ end=/'/
" Emails
syn region dockerfileEmail start=/</ end=/>/ contains=@ oneline
" Urls
syn match dockerfileUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\._]\+/
" Task tags
syn keyword dockerfileTodo contained TODO FIXME XXX
" Comments
syn region dockerfileComment start="#" end="\n" contains=dockerfileTodo
syn region dockerfileEnvWithComment start="^\s*ENV\>" end="\n" contains=dockerfileEnv
syn match dockerfileEnv contained /\<ENV\>/
" Highlighting
hi link dockerfileKeywords Keyword
hi link dockerfileEnv Keyword
hi link dockerfileString String
hi link dockerfileString1 String
hi link dockerfileComment Comment
hi link dockerfileEmail Identifier
hi link dockerfileUrl Identifier
hi link dockerfileTodo Todo
hi link bashStatement Function
let b:current_syntax = "dockerfile"

View File

@ -1,80 +0,0 @@
" Vim syntax file
" Language: Dockerfile
" Maintainer: Eugene Kalinin
" Latest Revision: 11 September 2013
" Source: https://docs.docker.com/compose/
if !exists('main_syntax')
let main_syntax = 'yaml'
endif
" case sensitivity (fix #17)
" syn case ignore
" Keywords
syn keyword dockercomposeKeywords build context dockerfile args cap_add cap_drop
syn keyword dockercomposeKeywords command cgroup_parent container_name devices depends_on
syn keyword dockercomposeKeywords dns dns_search tmpfs entrypoint env_file environment
syn keyword dockercomposeKeywords expose extends extends external_links extra_hosts
syn keyword dockercomposeKeywords group_add image isolation labels links
syn keyword dockercomposeKeywords log_opt net network_mode networks aliases
syn keyword dockercomposeKeywords ipv4_address ipv6_address link_local_ips pid ports
syn keyword dockercomposeKeywords security_opt stop_signal ulimits volumes volume_driver
syn keyword dockercomposeKeywords volumes_from cpu_shares cpu_quota cpuset domainname hostname
syn keyword dockercomposeKeywords ipc mac_address mem_limit memswap_limit oom_score_adj privileged
syn keyword dockercomposeKeywords read_only restart shm_size stdin_open tty user working_dir
syn keyword dockercomposeKeywords healthcheck test interval timeout retries disable sysctls
syn keyword dockercomposeKeywords userns_mode secrets
"" Volume configuration reference
syn keyword dockercomposeKeywords driver driver_opts external labels
"" Network configuration reference
syn keyword dockercomposeKeywords driver driver_opts enable_ipv6 ipam internal labels external
"" Versioning
syn keyword dockercomposeKeywords version services
"" Logging
syn keyword dockercomposeKeywords logging log_driver env options max-size max-file
syn keyword dockercomposeKeywords syslog-address syslog-facility syslog-tls-ca-cert syslog-tls-cert
syn keyword dockercomposeKeywords syslog-tls-key syslog-tls-skip tag syslog-format gelf-address
syn keyword dockercomposeKeywords gelf-compression-type gelf-compression-level fluentd-address
syn keyword dockercomposeKeywords fluentd-buffer-limit fluentd-retry-wait fluentd-max-retries
syn keyword dockercomposeKeywords fluentd-async-connect awslogs-region awslogs-group awslogs-stream
syn keyword dockercomposeKeywords splunk-token splunk-url splunk-source splunk-sourcetype splunk-index
syn keyword dockercomposeKeywords splunk-capath splunk-caname splunk-insecureskipverify gcp-project log-cmd
" Bash statements
setlocal iskeyword+=-
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
syn keyword bashStatement wget gzip
" Strings
syn region dockercomposeString start=/"/ skip=/\\"/ end=/"/
syn region dockercomposeString1 start=/'/ skip=/\\'/ end=/'/
" Emails
syn region dockercomposeEmail start=/</ end=/>/ contains=@ oneline
" Urls
syn match dockercomposeUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\.]\+/
" Task tags
syn keyword dockercomposeTodo contained TODO FIXME XXX
" Comments
syn region dockercomposeComment start="#" end="\n" contains=dockercomposeTodo
" Highlighting
hi link dockercomposeKeywords Keyword
hi link dockercomposeString String
hi link dockercomposeString1 String
hi link dockercomposeComment Comment
hi link dockercomposeEmail Identifier
hi link dockercomposeUrl Identifier
hi link dockercomposeTodo Todo
hi link bashStatement Function
let b:current_syntax = "dockercompose"

View File

@ -1,11 +0,0 @@
" Import Plugins
source ~/.vim/plugins.vim
" Main Vim config
source ~/.vim/editor.vim
" Handle conditions based on file type
source ~/.vim/filetype.vim

View File

@ -1,28 +0,0 @@
# Functions
function ansible-version(){
ansible --version
}
function ansible-role-init(){
if ! [ -z $1 ] ; then
echo "Ansible Role : $1 Creating...."
ansible-galaxy init $1
tree $1
else
echo "Usage : ansible-role-init <role name>"
echo "Example : ansible-role-init role1"
fi
}
# Alias
alias a='ansible '
alias aconf='ansible-config '
alias acon='ansible-console '
alias aver='ansible-version'
alias arinit='ansible-role-init'
alias aplaybook='ansible-playbook '
alias ainv='ansible-inventory '
alias adoc='ansible-doc '
alias agal='ansible-galaxy '
alias apull='ansible-pull '
alias aval='ansible-vault'

View File

@ -1,94 +0,0 @@
# Advanced Aliases.
# Use with caution
# Checks if a given command is availible
command_exists () {
type "$1" &> /dev/null ;
}
# Use exa package (if installed) for better ls
if command_exists exa ; then
alias ls='exa'
alias la='exa -a --icons'
alias tree='f() { exa -a --tree -L=${1:-2} --icons };f'
alias recent='exa -lahr --color-scale --icons --git --git-ignore -s=modified'
else
alias la='ls -a'
fi
alias l='ls' # List files, will use exa if availible
alias ll='ls -laFh' # List all files, with details, type indicators and headings
alias zshrc='${=EDITOR} ${ZDOTDIR:-$HOME}/.zshrc' # Quick access to the .zshrc file
alias grep='grep --color'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias t='tail -f'
# Command line head / tail shortcuts
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g L="| less"
alias -g M="| most"
alias -g LL="2>&1 | less"
alias -g CA="2>&1 | cat -A"
alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1"
alias -g P="2>&1| pygmentize -l pytb"
alias dud='du -d 1 -h'
alias duf='du -sh *'
(( $+commands[fd] )) || alias fd='find . -type d -name'
alias ff='find . -type f -name'
alias h='history'
alias hgrep="fc -El 0 | grep"
alias help='man'
alias p='ps -f'
alias sortnr='sort -n -r'
alias unexport='unset'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# zsh is able to auto-do some kungfoo
# depends on the SUFFIX :)
autoload -Uz is-at-least
if is-at-least 4.2.0; then
# open browser on urls
if [[ -n "$BROWSER" ]]; then
_browser_fts=(htm html de org net com at cx nl se dk)
for ft in $_browser_fts; do alias -s $ft='$BROWSER'; done
fi
_editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex)
for ft in $_editor_fts; do alias -s $ft='$EDITOR'; done
if [[ -n "$XIVIEWER" ]]; then
_image_fts=(jpg jpeg png gif mng tiff tif xpm)
for ft in $_image_fts; do alias -s $ft='$XIVIEWER'; done
fi
_media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm)
for ft in $_media_fts; do alias -s $ft=mplayer; done
#read documents
alias -s pdf=acroread
alias -s ps=gv
alias -s dvi=xdvi
alias -s chm=xchm
alias -s djvu=djview
#list whats inside packed file
alias -s zip="unzip -l"
alias -s rar="unrar l"
alias -s tar="tar tf"
alias -s tar.gz="echo "
alias -s ace="unace l"
fi
# Make zsh know about hosts already accessed by SSH
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'

View File

@ -1,307 +0,0 @@
# Git version checking
autoload -Uz is-at-least
git_version="${${(As: :)$(git version 2>/dev/null)}[3]}"
#
# Functions
#
# The name of the current branch
# Back-compatibility wrapper for when this function was defined here in
# the plugin, before being pulled in to core lib/git.zsh as git_current_branch()
# to fix the core -> git plugin dependency.
function current_branch() {
git_current_branch
}
# Pretty log messages
function _git_log_prettily(){
if ! [ -z $1 ]; then
git log --pretty=$1
fi
}
compdef _git _git_log_prettily=git-log
# Warn if the current branch is a WIP
function work_in_progress() {
if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
echo "WIP!!"
fi
}
# Check if main exists and use instead of master
function git_main_branch() {
command git rev-parse --git-dir &>/dev/null || return
local branch
for branch in main trunk; do
if command git show-ref -q --verify refs/heads/$branch; then
echo $branch
return
fi
done
echo master
}
#
# Aliases
# (sorted alphabetically)
#
alias g='git'
alias ga='git add'
alias gaa='git add --all'
alias gapa='git add --patch'
alias gau='git add --update'
alias gav='git add --verbose'
alias gap='git apply'
alias gapt='git apply --3way'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*($(git_main_branch)|development|develop|devel|dev)\s*$)" | command xargs -n 1 git branch -d'
alias gbD='git branch -D'
alias gbl='git blame -b -w'
alias gbnm='git branch --no-merged'
alias gbr='git branch --remote'
alias gbs='git bisect'
alias gbsb='git bisect bad'
alias gbsg='git bisect good'
alias gbsr='git bisect reset'
alias gbss='git bisect start'
alias gc='git commit -v'
alias gc!='git commit -v --amend'
alias gcn!='git commit -v --no-edit --amend'
alias gca='git commit -v -a'
alias gca!='git commit -v -a --amend'
alias gcan!='git commit -v -a --no-edit --amend'
alias gcans!='git commit -v -a -s --no-edit --amend'
alias gcam='git commit -a -m'
alias gcsm='git commit -s -m'
alias gcb='git checkout -b'
alias gcf='git config --list'
alias gcl='git clone --recurse-submodules'
alias gclean='git clean -id'
alias gpristine='git reset --hard && git clean -dffx'
alias gcm='git checkout $(git_main_branch)'
alias gcd='git checkout develop'
alias gcmsg='git commit -m'
alias gco='git checkout'
alias gcount='git shortlog -sn'
alias gcp='git cherry-pick'
alias gcpa='git cherry-pick --abort'
alias gcpc='git cherry-pick --continue'
alias gcs='git commit -S'
alias gd='git diff'
alias gdca='git diff --cached'
alias gdcw='git diff --cached --word-diff'
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
alias gds='git diff --staged'
alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff'
function gdnolock() {
git diff "$@" ":(exclude)package-lock.json" ":(exclude)*.lock"
}
compdef _git gdnolock=git-diff
function gdv() { git diff -w "$@" | view - }
compdef _git gdv=git-diff
alias gf='git fetch'
# --jobs=<n> was added in git 2.8
is-at-least 2.8 "$git_version" \
&& alias gfa='git fetch --all --prune --jobs=10' \
|| alias gfa='git fetch --all --prune'
alias gfo='git fetch origin'
alias gfg='git ls-files | grep'
alias gg='git gui citool'
alias gga='git gui citool --amend'
function ggf() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git push --force origin "${b:=$1}"
}
compdef _git ggf=git-checkout
function ggfl() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git push --force-with-lease origin "${b:=$1}"
}
compdef _git ggfl=git-checkout
function ggl() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git pull origin "${*}"
else
[[ "$#" == 0 ]] && local b="$(git_current_branch)"
git pull origin "${b:=$1}"
fi
}
compdef _git ggl=git-checkout
function ggp() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git push origin "${*}"
else
[[ "$#" == 0 ]] && local b="$(git_current_branch)"
git push origin "${b:=$1}"
fi
}
compdef _git ggp=git-checkout
function ggpnp() {
if [[ "$#" == 0 ]]; then
ggl && ggp
else
ggl "${*}" && ggp "${*}"
fi
}
compdef _git ggpnp=git-checkout
function ggu() {
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
git pull --rebase origin "${b:=$1}"
}
compdef _git ggu=git-checkout
alias ggpur='ggu'
alias ggpull='git pull origin "$(git_current_branch)"'
alias ggpush='git push origin "$(git_current_branch)"'
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
alias gpsup='git push --set-upstream origin $(git_current_branch)'
alias ghh='git help'
alias gignore='git update-index --assume-unchanged'
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
alias gk='\gitk --all --branches'
alias gke='\gitk --all $(git log -g --pretty=%h)'
alias gl='git pull'
alias glg='git log --stat'
alias glgp='git log --stat -p'
alias glgg='git log --graph'
alias glgga='git log --graph --decorate --all'
alias glgm='git log --graph --max-count=10'
alias glo='git log --oneline --decorate'
alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat"
alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'"
alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short"
alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"
alias glog='git log --oneline --decorate --graph'
alias gloga='git log --oneline --decorate --graph --all'
alias glp="_git_log_prettily"
alias gm='git merge'
alias gmom='git merge origin/$(git_main_branch)'
alias gmt='git mergetool --no-prompt'
alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
alias gmum='git merge upstream/$(git_main_branch)'
alias gma='git merge --abort'
alias gp='git push'
alias gpd='git push --dry-run'
alias gpf='git push --force-with-lease'
alias gpf!='git push --force'
alias gpoat='git push origin --all && git push origin --tags'
alias gpu='git push upstream'
alias gpv='git push -v'
alias gr='git remote'
alias gra='git remote add'
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias grbd='git rebase develop'
alias grbi='git rebase -i'
alias grbm='git rebase $(git_main_branch)'
alias grbs='git rebase --skip'
alias grev='git revert'
alias grh='git reset'
alias grhh='git reset --hard'
alias groh='git reset origin/$(git_current_branch) --hard'
alias grm='git rm'
alias grmc='git rm --cached'
alias grmv='git remote rename'
alias grrm='git remote remove'
alias grs='git restore'
alias grset='git remote set-url'
alias grss='git restore --source'
alias grst='git restore --staged'
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
alias gru='git reset --'
alias grup='git remote update'
alias grv='git remote -v'
alias gsb='git status -sb'
alias gsd='git svn dcommit'
alias gsh='git show'
alias gsi='git submodule init'
alias gsps='git show --pretty=short --show-signature'
alias gsr='git svn rebase'
alias gss='git status -s'
alias gst='git status'
# use the default stash push on git 2.13 and newer
is-at-least 2.13 "$git_version" \
&& alias gsta='git stash push' \
|| alias gsta='git stash save'
alias gstaa='git stash apply'
alias gstc='git stash clear'
alias gstd='git stash drop'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gsts='git stash show --text'
alias gstu='git stash --include-untracked'
alias gstall='git stash --all'
alias gsu='git submodule update'
alias gsw='git switch'
alias gswc='git switch -c'
alias gts='git tag -s'
alias gtv='git tag | sort -V'
alias gtl='gtl(){ git tag --sort=-v:refname -n -l "${1}*" }; noglob gtl'
alias gunignore='git update-index --no-assume-unchanged'
alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
alias gup='git pull --rebase'
alias gupv='git pull --rebase -v'
alias gupa='git pull --rebase --autostash'
alias gupav='git pull --rebase --autostash -v'
alias glum='git pull upstream $(git_main_branch)'
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
alias gam='git am'
alias gamc='git am --continue'
alias gams='git am --skip'
alias gama='git am --abort'
alias gamscp='git am --show-current-patch'
function grename() {
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 old_branch new_branch"
return 1
fi
# Rename branch locally
git branch -m "$1" "$2"
# Rename branch in origin remote
if git push origin :"$1"; then
git push --set-upstream origin "$2"
fi
}
unset git_version

View File

@ -1,44 +0,0 @@
# LOL!!1
# Source: https://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
alias rtfm='man'
alias :3='echo'
alias visible='echo'
alias invisible='cat'
alias moar='more'
alias tldr='less'
alias alwayz='tail -f'
alias icanhas='mkdir'
alias gimmeh='touch'
alias donotwant='rm'
alias dowant='cp'
alias gtfo='mv'
alias nowai='chmod'
alias hai='cd'
alias iz='ls'
alias plz='pwd'
alias ihasbucket='df -h'
alias inur='locate'
alias iminurbase='finger'
alias btw='nice'
alias obtw='nohup'
alias nomz='ps aux'
alias nomnom='killall'
alias byes='exit'
alias cyal8r='reboot'
alias rulz='git push'
alias bringz='git pull'
alias chicken='git add'
alias oanward='git commit -m'

View File

@ -1,61 +0,0 @@
(( $+commands[npm] )) && {
rm -f "${ZSH_CACHE_DIR:-$ZSH/cache}/npm_completion"
_npm_completion() {
local si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
}
if type "compdef" > /dev/null; then
compdef _npm_completion npm
fi
}
# Install dependencies globally
alias npmg="npm i -g "
# npm package names are lowercase
# Thus, we've used camelCase for the following aliases:
# Install and save to dependencies in your package.json
# npms is used by https://www.npmjs.com/package/npms
alias npmS="npm i -S "
# Install and save to dev-dependencies in your package.json
# npmd is used by https://github.com/dominictarr/npmd
alias npmD="npm i -D "
# Execute command from node_modules folder based on current directory
# i.e npmE gulp
alias npmE='PATH="$(npm bin)":"$PATH"'
# Check which npm modules are outdated
alias npmO="npm outdated"
# Check package versions
alias npmV="npm -v"
# List packages
alias npmL="npm list"
# List top-level installed packages
alias npmL0="npm ls --depth=0"
# Run npm start
alias npmst="npm start"
# Run npm test
alias npmt="npm test"
# Run npm scripts
alias npmR="npm run"
# Run npm publish
alias npmP="npm publish"
# Run npm init
alias npmI="npm init"

View File

@ -1,97 +0,0 @@
if ! (( $+commands[tmux] )); then
print "zsh tmux plugin: tmux not found. Please install tmux before using this plugin." >&2
return 1
fi
# ALIASES
alias ta='tmux attach -t'
alias tad='tmux attach -d -t'
alias ts='tmux new-session -s'
alias tl='tmux list-sessions'
alias tksv='tmux kill-server'
alias tkss='tmux kill-session -t'
# CONFIGURATION VARIABLES
# Automatically start tmux
: ${ZSH_TMUX_AUTOSTART:=false}
# Only autostart once. If set to false, tmux will attempt to
# autostart every time your zsh configs are reloaded.
: ${ZSH_TMUX_AUTOSTART_ONCE:=true}
# Automatically connect to a previous session if it exists
: ${ZSH_TMUX_AUTOCONNECT:=true}
# Automatically close the terminal when tmux exits
: ${ZSH_TMUX_AUTOQUIT:=$ZSH_TMUX_AUTOSTART}
# Set term to screen or screen-256color based on current terminal support
: ${ZSH_TMUX_FIXTERM:=true}
# Set '-CC' option for iTerm2 tmux integration
: ${ZSH_TMUX_ITERM2:=false}
# The TERM to use for non-256 color terminals.
# Tmux states this should be screen, but you may need to change it on
# systems without the proper terminfo
: ${ZSH_TMUX_FIXTERM_WITHOUT_256COLOR:=screen}
# The TERM to use for 256 color terminals.
# Tmux states this should be screen-256color, but you may need to change it on
# systems without the proper terminfo
: ${ZSH_TMUX_FIXTERM_WITH_256COLOR:=screen-256color}
# Set the configuration path
: ${ZSH_TMUX_CONFIG:=$HOME/.tmux.conf}
# Set -u option to support unicode
: ${ZSH_TMUX_UNICODE:=false}
# Determine if the terminal supports 256 colors
if [[ $terminfo[colors] == 256 ]]; then
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR
else
export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITHOUT_256COLOR
fi
# Set the correct local config file to use.
if [[ "$ZSH_TMUX_ITERM2" == "false" && -e "$ZSH_TMUX_CONFIG" ]]; then
export ZSH_TMUX_CONFIG
fi
# Wrapper function for tmux.
function _zsh_tmux_plugin_run() {
if [[ -n "$@" ]]; then
command tmux "$@"
return $?
fi
local -a tmux_cmd
tmux_cmd=(command tmux)
[[ "$ZSH_TMUX_ITERM2" == "true" ]] && tmux_cmd+=(-CC)
[[ "$ZSH_TMUX_UNICODE" == "true" ]] && tmux_cmd+=(-u)
# Try to connect to an existing session.
[[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] && $tmux_cmd attach
# If failed, just run tmux, fixing the TERM variable if requested.
if [[ $? -ne 0 ]]; then
if [[ -e "$ZSH_TMUX_CONFIG" ]]; then
tmux_cmd+=(-f "$ZSH_TMUX_CONFIG")
fi
$tmux_cmd new-session
fi
if [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]]; then
exit
fi
}
if hash compdef 2>/dev/null; then
# Use the completions for tmux for our function
compdef _tmux _zsh_tmux_plugin_run
# Alias tmux to our wrapper function.
alias tmux=_zsh_tmux_plugin_run
fi
# Autostart if not already in tmux and enabled.
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" ]]; then
# Actually don't autostart if we already did and multiple autostarts are disabled.
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then
export ZSH_TMUX_AUTOSTARTED=true
_zsh_tmux_plugin_run
fi
fi

@ -1 +0,0 @@
Subproject commit 64de2dcd95d6a8e879cd2244c763d99f0144e78e

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,48 +0,0 @@
# Requires colors autoload.
# See termcap(5).
# Set up once, and then reuse. This way it supports user overrides after the
# plugin is loaded.
typeset -AHg less_termcap
# bold & blinking mode
less_termcap[mb]="${fg_bold[red]}"
less_termcap[md]="${fg_bold[red]}"
less_termcap[me]="${reset_color}"
# standout mode
less_termcap[so]="${fg_bold[yellow]}${bg[blue]}"
less_termcap[se]="${reset_color}"
# underlining
less_termcap[us]="${fg_bold[green]}"
less_termcap[ue]="${reset_color}"
# Absolute path to this file's directory.
typeset __colored_man_pages_dir="${0:A:h}"
function colored() {
local -a environment
# Convert associative array to plain array of NAME=VALUE items.
local k v
for k v in "${(@kv)less_termcap}"; do
environment+=( "LESS_TERMCAP_${k}=${v}" )
done
# Prefer `less` whenever available, since we specifically configured
# environment for it.
environment+=( PAGER="${commands[less]:-$PAGER}" )
# See ./nroff script.
if [[ "$OSTYPE" = solaris* ]]; then
environment+=( PATH="${__colored_man_pages_dir}:$PATH" )
fi
command env $environment "$@"
}
# Colorize man and dman/debman (from debian-goodies)
function man \
dman \
debman {
colored $0 "$@"
}

View File

@ -1,114 +0,0 @@
# Easier alias to use the plugin
alias ccat="colorize_cat"
alias cless="colorize_less"
# '$0:A' gets the absolute path of this file
ZSH_COLORIZE_PLUGIN_PATH=$0:A
colorize_check_requirements() {
local -a available_tools
available_tools=("chroma" "pygmentize")
if [ -z "$ZSH_COLORIZE_TOOL" ]; then
if (( $+commands[pygmentize] )); then
ZSH_COLORIZE_TOOL="pygmentize"
elif (( $+commands[chroma] )); then
ZSH_COLORIZE_TOOL="chroma"
else
echo "Neither 'pygments' nor 'chroma' is installed!" >&2
return 1
fi
fi
if [[ ${available_tools[(Ie)$ZSH_COLORIZE_TOOL]} -eq 0 ]]; then
echo "ZSH_COLORIZE_TOOL '$ZSH_COLORIZE_TOOL' not recognized. Available options are 'pygmentize' and 'chroma'." >&2
return 1
elif (( $+commands["$ZSH_COLORIZE_TOOL"] )); then
echo "Package '$ZSH_COLORIZE_TOOL' is not installed!" >&2
return 1
fi
}
colorize_cat() {
if ! colorize_check_requirements; then
return 1
fi
# If the environment variable ZSH_COLORIZE_STYLE
# is set, use that theme instead. Otherwise,
# use the default.
if [ -z "$ZSH_COLORIZE_STYLE" ]; then
# Both pygmentize & chroma support 'emacs'
ZSH_COLORIZE_STYLE="emacs"
fi
# Use stdin if no arguments have been passed.
if [ $# -eq 0 ]; then
if [[ "$ZSH_COLORIZE_TOOL" == "pygmentize" ]]; then
pygmentize -O style="$ZSH_COLORIZE_STYLE" -g
else
chroma --style="$ZSH_COLORIZE_STYLE" --formatter="${ZSH_COLORIZE_CHROMA_FORMATTER:-terminal}"
fi
return $?
fi
# Guess lexer from file extension, or guess it from file contents if unsuccessful.
local FNAME lexer
for FNAME in "$@"; do
if [[ "$ZSH_COLORIZE_TOOL" == "pygmentize" ]]; then
lexer=$(pygmentize -N "$FNAME")
if [[ $lexer != text ]]; then
pygmentize -O style="$ZSH_COLORIZE_STYLE" -l "$lexer" "$FNAME"
else
pygmentize -O style="$ZSH_COLORIZE_STYLE" -g "$FNAME"
fi
else
chroma --style="$ZSH_COLORIZE_STYLE" --formatter="${ZSH_COLORIZE_CHROMA_FORMATTER:-terminal}" "$FNAME"
fi
done
}
# The less option 'F - Forward forever; like "tail -f".' will not work in this implementation
# caused by the lack of the ability to follow the file within pygmentize.
colorize_less() {
if ! colorize_check_requirements; then
return 1
fi
_cless() {
# LESS="-R $LESS" enables raw ANSI colors, while maintain already set options.
local LESS="-R $LESS"
# This variable tells less to pipe every file through the specified command
# (see the man page of less INPUT PREPROCESSOR).
# 'zsh -ic "colorize_cat %s 2> /dev/null"' would not work for huge files like
# the ~/.zsh_history. For such files the tty of the preprocessor will be supended.
# Therefore we must source this file to make colorize_cat available in the
# preprocessor without the interactive mode.
# `2>/dev/null` will suppress the error for large files 'broken pipe' of the python
# script pygmentize, which will show up if less has not fully "loaded the file"
# (e.g. when not scrolled to the bottom) while already the next file will be displayed.
local LESSOPEN="| zsh -c 'source \"$ZSH_COLORIZE_PLUGIN_PATH\"; \
ZSH_COLORIZE_TOOL=$ZSH_COLORIZE_TOOL ZSH_COLORIZE_STYLE=$ZSH_COLORIZE_STYLE \
colorize_cat %s 2> /dev/null'"
# LESSCLOSE will be set to prevent any errors by executing a user script
# which assumes that his LESSOPEN has been executed.
local LESSCLOSE=""
LESS="$LESS" LESSOPEN="$LESSOPEN" LESSCLOSE="$LESSCLOSE" command less "$@"
}
if [ -t 0 ]; then
_cless "$@"
else
# The input is not associated with a terminal, therefore colorize_cat will
# colorize this input and pass it to less.
# Less has now to decide what to use. If any files have been provided, less
# will ignore the input by default, otherwise the colorized input will be used.
# If files have been supplied and the input has been redirected, this will
# lead to unnecessary overhead, but retains the ability to use the less options
# without checking for them inside this script.
colorize_cat | _cless "$@"
fi
}

File diff suppressed because it is too large Load Diff

View File

@ -1,148 +0,0 @@
# Copyright (c) 2017 Henry Chang
__zic_fzf_prog() {
[ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] \
&& echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf"
}
__zic_matched_subdir_list() {
local dir length seg starts_with_dir
if [[ "$1" == */ ]]; then
dir="$1"
if [[ "$dir" != / ]]; then
dir="${dir: : -1}"
fi
length=$(echo -n "$dir" | wc -c)
if [ "$dir" = "/" ]; then
length=0
fi
find -L "$dir" -mindepth 1 -maxdepth 1 -type d 2>/dev/null \
| cut -b $(( ${length} + 2 ))- | sed '/^$/d' | while read -r line; do
if [[ "${line[1]}" == "." ]]; then
continue
fi
echo "$line"
done
else
dir=$(dirname -- "$1")
length=$(echo -n "$dir" | wc -c)
if [ "$dir" = "/" ]; then
length=0
fi
seg=$(basename -- "$1")
starts_with_dir=$( \
find -L "$dir" -mindepth 1 -maxdepth 1 -type d \
2>/dev/null | cut -b $(( ${length} + 2 ))- | sed '/^$/d' \
| while read -r line; do
if [[ "${seg[1]}" != "." && "${line[1]}" == "." ]]; then
continue
fi
if [[ "$line" == "$seg"* ]]; then
echo "$line"
fi
done
)
if [ -n "$starts_with_dir" ]; then
echo "$starts_with_dir"
else
find -L "$dir" -mindepth 1 -maxdepth 1 -type d \
2>/dev/null | cut -b $(( ${length} + 2 ))- | sed '/^$/d' \
| while read -r line; do
if [[ "${seg[1]}" != "." && "${line[1]}" == "." ]]; then
continue
fi
if [[ "$line" == *"$seg"* ]]; then
echo "$line"
fi
done
fi
fi
}
_zic_list_generator() {
__zic_matched_subdir_list "${(Q)@[-1]}" | sort
}
_zic_complete() {
setopt localoptions nonomatch
local l matches fzf tokens base
l=$(_zic_list_generator $@)
if [ -z "$l" ]; then
zle ${__zic_default_completion:-expand-or-complete}
return
fi
fzf=$(__zic_fzf_prog)
if [ $(echo $l | wc -l) -eq 1 ]; then
matches=${(q)l}
else
matches=$(echo $l \
| FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} \
--reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS \
--bind 'shift-tab:up,tab:down'" ${=fzf} \
| while read -r item; do
echo -n "${(q)item} "
done)
fi
matches=${matches% }
if [ -n "$matches" ]; then
tokens=(${(z)LBUFFER})
base="${(Q)@[-1]}"
if [[ "$base" != */ ]]; then
if [[ "$base" == */* ]]; then
base="$(dirname -- "$base")"
if [[ ${base[-1]} != / ]]; then
base="$base/"
fi
else
base=""
fi
fi
LBUFFER="${tokens[1]} "
if [ -n "$base" ]; then
base="${(q)base}"
if [ "${tokens[2][1]}" = "~" ]; then
base="${base/#$HOME/~}"
fi
LBUFFER="${LBUFFER}${base}"
fi
LBUFFER="${LBUFFER}${matches}/"
fi
zle redisplay
typeset -f zle-line-init >/dev/null && zle zle-line-init
}
zic-completion() {
setopt localoptions noshwordsplit noksh_arrays noposixbuiltins
local tokens cmd
tokens=(${(z)LBUFFER})
cmd=${tokens[1]}
if [[ "$LBUFFER" =~ "^\ *cd$" ]]; then
zle ${__zic_default_completion:-expand-or-complete}
elif [ "$cmd" = cd ]; then
_zic_complete ${tokens[2,${#tokens}]/#\~/$HOME}
else
zle ${__zic_default_completion:-expand-or-complete}
fi
}
[ -z "$__zic_default_completion" ] && {
binding=$(bindkey '^I')
# $binding[(s: :w)2]
# The command substitution and following word splitting to determine the
# default zle widget for ^I formerly only works if the IFS parameter contains
# a space via $binding[(w)2]. Now it specifically splits at spaces, regardless
# of IFS.
[[ $binding =~ 'undefined-key' ]] || __zic_default_completion=$binding[(s: :w)2]
unset binding
}
zle -N zic-completion
bindkey -M emacs '^I' zic-completion
bindkey -M viins '^I' zic-completion

View File

@ -1,115 +0,0 @@
#compdef ufw
#autoload
typeset -A opt_args
function _ufw_delete_rules {
if ufw status &> /dev/null ; then
ufw status numbered \
| perl -n -e'/\[ +(\d+)\] +([^ ].+)/ && print "\"$1\[$2\]\" "'
fi
}
function _ufw_app_profiles {
grep -rhoP "(?<=\[)[^\]]+" /etc/ufw/applications.d/ \
| awk '{ print "\""$0"\""}' \
| tr '\n' ' '
}
local -a _1st_arguments
_1st_arguments=(
'allow:add allow rule'
'app:Application profile commands'
'default:set default policy'
'delete:delete RULE'
'deny:add deny rule'
'disable:disables the firewall'
'enable:enables the firewall'
'insert:insert RULE at NUM'
'limit:add limit rule'
'logging:set logging to LEVEL'
'reject:add reject rule'
'reload:reloads firewall'
'reset:reset firewall'
'show:show firewall report'
'status:show firewall status'
'version:display version information'
)
local context state line curcontext="$curcontext"
_arguments -C \
'(--dry-run)--dry-run[dry run]' \
'1:: :->cmds' \
'2:: :->subcmds' \
'3:: :->subsubcmds' \
&& return 0
local rules
case "$state" in
(cmds)
_describe -t commands "ufw commands" _1st_arguments
return 0
;;
(subcmds)
case "$line[1]" in
(app)
_values 'app' \
'list[list application profiles]' \
'info[show information on PROFILE]' \
'update[update PROFILE]' \
'default[set default application policy]' \
&& ret=0
;;
(status)
_values 'status' \
'numbered[show firewall status as numbered list of RULES]' \
'verbose[show verbose firewall status]' \
&& ret=0
;;
(logging)
_values 'logging' \
'on' 'off' 'low' 'medium' 'high' 'full' \
&& ret=0
;;
(default)
_values 'default' \
'allow' 'deny' 'reject' \
&& ret=0
;;
(show)
_values 'show' \
'raw' 'builtins' 'before-rules' 'user-rules' 'after-rules' 'logging-rules' 'listening' 'added' \
&& ret=0
;;
(delete)
rules="$(_ufw_delete_rules)"
if [[ -n "$rules" ]] ; then
_values 'delete' \
${(Q)${(z)"$(_ufw_delete_rules)"}} \
&& ret=0
fi
;;
esac
;;
(subsubcmds)
case "$line[1]" in
(app)
case "$line[2]" in
(info|update)
_values 'profiles' \
${(Q)${(z)"$(_ufw_app_profiles)"}} \
&& ret=0
;;
esac
;;
(default)
_values 'default-direction' \
'incoming' 'outgoing' \
&& ret=0
;;
esac
esac
return

Some files were not shown because too many files have changed in this diff Show More