diff --git a/configs/bashrc b/configs/bashrc index d7f76d2..5d54be8 100644 --- a/configs/bashrc +++ b/configs/bashrc @@ -1,5 +1,5 @@ ###################################################### -# byt3gl's .bashrc (partially modified for publishing) +# bt3's .bashrc (partially modified for publishing) ###################################################### # ## @@ -170,17 +170,6 @@ export HISTFILESIZE=3000 export HISTCONTROL=ignoredups - - -###################################################### -# ALIAS TO CONNECTIONS -###################################################### - - - - - - ###################################################### # FUNCTIONS ###################################################### diff --git a/configs/tmux.conf b/configs/tmux.conf index 52da9ea..b2b8bb1 100644 --- a/configs/tmux.conf +++ b/configs/tmux.conf @@ -1,5 +1,3 @@ -# from @ivanlei - # Change prefix key to Ctrl+p # unbind C-b # set -g prefix C-p diff --git a/configs/vim/.netrwhist b/configs/vim/.netrwhist new file mode 100644 index 0000000..b9c4d99 --- /dev/null +++ b/configs/vim/.netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =1 +let g:netrw_dirhist_1='/Users/bt3_/Projects/blog/blog/output/author' diff --git a/configs/vim/bundle/ctrlp.vim b/configs/vim/bundle/ctrlp.vim new file mode 160000 index 0000000..b5d3fe6 --- /dev/null +++ b/configs/vim/bundle/ctrlp.vim @@ -0,0 +1 @@ +Subproject commit b5d3fe66a58a13d2ff8b6391f4387608496a030f diff --git a/configs/vim/bundle/nerdtree b/configs/vim/bundle/nerdtree new file mode 160000 index 0000000..96c0774 --- /dev/null +++ b/configs/vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit 96c07746b46c12d0aca7a5276cc5bd0a260b82fe diff --git a/configs/vim/bundle/python-mode b/configs/vim/bundle/python-mode new file mode 160000 index 0000000..9c8468e --- /dev/null +++ b/configs/vim/bundle/python-mode @@ -0,0 +1 @@ +Subproject commit 9c8468e83232c3e45b730d2d0b28d609053dec05 diff --git a/configs/vim/bundle/vim-airline b/configs/vim/bundle/vim-airline new file mode 160000 index 0000000..78566c3 --- /dev/null +++ b/configs/vim/bundle/vim-airline @@ -0,0 +1 @@ +Subproject commit 78566c37aeb3b7609eee84a7b10114a0f512830e diff --git a/configs/vim/bundle/vim-fugitive b/configs/vim/bundle/vim-fugitive new file mode 160000 index 0000000..1c84437 --- /dev/null +++ b/configs/vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 1c844375fa2762e3b7c16294fa36afee6fef28b1 diff --git a/configs/vim/bundle/vim-sensible b/configs/vim/bundle/vim-sensible new file mode 160000 index 0000000..d0beb8a --- /dev/null +++ b/configs/vim/bundle/vim-sensible @@ -0,0 +1 @@ +Subproject commit d0beb8ab42627bea2c747564ca46ec663e3ba0ba diff --git a/configs/vim/bundle/vim/.netrwhist b/configs/vim/bundle/vim/.netrwhist new file mode 100644 index 0000000..06f22f1 --- /dev/null +++ b/configs/vim/bundle/vim/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =2 +let g:netrw_dirhist_1='/Users/marina/Projects/THREAT_INTEL/threat_intel/threat_intel/util' +let g:netrw_dirhist_2='/Users/marina/Projects/security-tools' diff --git a/configs/vim/bundle/vundle b/configs/vim/bundle/vundle new file mode 160000 index 0000000..cfd3b2d --- /dev/null +++ b/configs/vim/bundle/vundle @@ -0,0 +1 @@ +Subproject commit cfd3b2d388a8c2e9903d7a9d80a65539aabfe933 diff --git a/configs/vim/colors/cyberpunk.vim b/configs/vim/colors/cyberpunk.vim new file mode 100644 index 0000000..87ab9ac --- /dev/null +++ b/configs/vim/colors/cyberpunk.vim @@ -0,0 +1,136 @@ +""" =========================================================================== +" File: cyberpunk.vim +" Description: A port of Emacs' Cyberpunk colorscheme for vim. +""" =========================================================================== + +set background=dark + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "cyberpunk" + +" Cyberpunk theme colors {{{ +let s:colors = { + \ "cyberpunk-fg": "#dcdccc", + \ "cyberpunk-bg-1": "#2b2b2b", + \ "cyberpunk-bg-05": "#383838", + \ "cyberpunk-bg": "#000000", + \ "cyberpunk-bg+1": "#4f4f4f", + \ "cyberpunk-bg+2": "#5f5f5f", + \ "cyberpunk-bg+3": "#6f6f6f", + \ "cyberpunk-red+1": "#dca3a3", + \ "cyberpunk-red": "#ff0000", + \ "cyberpunk-red-1": "#8b0000", + \ "cyberpunk-red-2": "#8b0000", + \ "cyberpunk-red-3": "#9c6363", + \ "cyberpunk-red-4": "#8c5353", + \ "cyberpunk-red-5": "#7F073F", + \ "cyberpunk-pink": "#ff69b4", + \ "cyberpunk-pink-1": "#ff1493", + \ "cyberpunk-pink-2": "#cd1076", + \ "cyberpunk-orange-2": "#FF6400", + \ "cyberpunk-orange-1": "#ff8c00", + \ "cyberpunk-orange": "#ffa500", + \ "cyberpunk-yellow": "#ffff00", + \ "cyberpunk-yellow-1": "#FBDE2D", + \ "cyberpunk-yellow-2": "#d0bf8f", + \ "cyberpunk-yellow-3": "#D8FA3C", + \ "cyberpunk-yellow-4": "#E9C062", + \ "cyberpunk-yellow-5": "#ffd700", + \ "cyberpunk-green-2": "#006400", + \ "cyberpunk-green-1": "#2e8b57", + \ "cyberpunk-green": "#00ff00", + \ "cyberpunk-green+1": "#61CE3C", + \ "cyberpunk-green+2": "#9fc59f", + \ "cyberpunk-green+3": "#afd8af", + \ "cyberpunk-green+4": "#bfebbf", + \ "cyberpunk-cyan": "#93e0e3", + \ "cyberpunk-blue+1": "#94bff3", + \ "cyberpunk-blue": "#0000ff", + \ "cyberpunk-blue-1": "#7b68ee", + \ "cyberpunk-blue-2": "#6a5acd", + \ "cyberpunk-blue-3": "#add8e6", + \ "cyberpunk-blue-4": "#b2dfee", + \ "cyberpunk-blue-5": "#4c83ff", + \ "cyberpunk-blue-6": "#96CBFE", + \ "cyberpunk-blue-7": "#00ffff", + \ "cyberpunk-blue-8": "#4F94CD", + \ "cyberpunk-magenta": "#dc8cc3", + \ "cyberpunk-black": "#000000", + \ "cyberpunk-black-2": "#0C1021", + \ "cyberpunk-black-3": "#0A0A0A", + \ "cyberpunk-gray": "#d3d3d3", + \ "cyberpunk-gray-2": "#8B8989", + \ "cyberpunk-gray-3": "#919191", + \ "cyberpunk-gray-4": "#999999", + \ "cyberpunk-gray-5": "#333333", + \ "cyberpunk-gray-6": "#1A1A1A", + \ "cyberpunk-gray-7": "#4D4D4D", + \ "cyberpunk-gray-8": "#262626", + \ "cyberpunk-white": "#ffffff", + \ "cyberpunk-white-2": "#F8F8F8", + \ "cyberpunk-white-3": "#fffafa" +\ } + + +function! Hi(name, guifg, guibg) + let l:cmd = "hi " . a:name . " guifg=" . a:guifg . " guibg=" . a:guibg + exe l:cmd +endfunc + +call Hi("Normal", s:colors["cyberpunk-fg"], s:colors["cyberpunk-black"]) +call Hi("Cursor", s:colors["cyberpunk-fg"], s:colors["cyberpunk-yellow-1"]) +call Hi("Visual", s:colors["cyberpunk-fg"], s:colors["cyberpunk-red-5"]) +call Hi("Visual", s:colors["cyberpunk-fg"], s:colors["cyberpunk-red-5"]) +call Hi("LineNr", s:colors["cyberpunk-green+2"], s:colors["cyberpunk-bg"]) + +call Hi("DiffAdd", s:colors["cyberpunk-green"], s:colors["cyberpunk-black"]) +call Hi("DiffChange", s:colors["cyberpunk-yellow"], s:colors["cyberpunk-black"]) +call Hi("DiffDelete", s:colors["cyberpunk-red"], s:colors["cyberpunk-black"]) + +call Hi("StatusLine", s:colors["cyberpunk-gray-5"], s:colors["cyberpunk-blue-5"]) +call Hi("StatusLineNC", s:colors["cyberpunk-gray-6"], s:colors["cyberpunk-gray-7"]) + + +exe "hi Warning guifg=" . s:colors["cyberpunk-pink"] +call Hi("VertSplit", s:colors["cyberpunk-gray-5"], s:colors["cyberpunk-gray-5"]) + +if version >= 700 + exe "hi CursorLine guibg=" . s:colors["cyberpunk-gray-5"] +endif + +" Syntax highlighting {{{ +exe "hi String guifg=" . s:colors["cyberpunk-green+1"] +exe "hi Type guifg=" . s:colors["cyberpunk-yellow-3"] +exe "hi Function guifg=" . s:colors["cyberpunk-pink-1"] +exe "hi Comment guifg=" . s:colors["cyberpunk-gray-2"] . " cterm=italic" +exe "hi Keyword guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Identifier guifg=" . s:colors["cyberpunk-yellow-3"] +exe "hi Conditional guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Repeat guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Operator guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Label guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Structure guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi StorageClass guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Typedef guifg=" . s:colors["cyberpunk-yellow-1"] +exe "hi Constant guifg=" . s:colors["cyberpunk-blue-5"] +exe "hi PreProc guifg=" . s:colors["cyberpunk-gray-3"] + +exe "hi Delimiter guifg=" . s:colors["cyberpunk-fg"] +" Numbers +exe "hi Number guifg=" . s:colors["cyberpunk-fg"] +exe "hi Float guifg=" . s:colors["cyberpunk-fg"] +" }}} + +if has("gui_running") + set guicursor+=n-v-i:blinkwait750-blinkon750-blinkoff750 +endif + +exe "hi Directory guifg=" . s:colors["cyberpunk-pink-1"] + +exe "hi ExtraWhitespace guibg=" . s:colors["cyberpunk-red"] \ No newline at end of file diff --git a/configs/vimrc b/configs/vimrc new file mode 100755 index 0000000..dd02cfe --- /dev/null +++ b/configs/vimrc @@ -0,0 +1,172 @@ +" display options { + syntax on "syntax coloring is a first-cut debugging tool + colorscheme cyberpunk "change to taste. try `desert' or `evening' + + set wrap "wrap long lines + set scrolloff=3 "keep three lines visible above and below + set ruler showcmd "give line, column, and command in the status line + set laststatus=2 "always show the status line + "make filename-completion more terminal-like + set wildmode=longest:full + set wildmenu "a menu for resolving ambiguous tab-completion + "files we never want to edit + set wildignore=*.pyc,*.sw[pno],.*.bak,.*.tmp + + set incsearch "search as you type + set hlsearch "highlight the search + set ignorecase "ignore case + set smartcase " ...unless the search uses uppercase letters + set number +" } + +" movement options { + "enable mouse in normal, visual, help, prompt modes + "I skip insert/command modes because it prevents proper middle-click pasting + "TODO: can we get paste to work even with mouse enabled? + set mouse=nvrh + + " Moving up/down moves visually. + " This makes files with very long lines much more manageable. + nnoremap j gj + nnoremap k gk + " Moving left/right will wrap around to the previous/next line. + set whichwrap=b,s,h,l,<,>,~,[,] + " Backspace will delete whatever is behind your cursor. + set backspace=indent,eol,start + + "Bind the 'old' up and down. Use these to skip past a very long line. + noremap gj j + noremap gk k +" } + +" general usability { + "turn off the annoying "ding!" + set visualbell + + "allow setting extra option directly in files + "example: "vim: syntax=vim" + set modeline + + "don't clobber the buffer when pasting in visual mode + vmap P p + vnoremap p "_dP +" } + +" windows-style mappings { + "ctrl+S to save. + "NOTE: put this in ~/.bashrc for it to work properly in terminal vim: + " stty -ixon -ixoff + map :update + imap + "ctrl+A to select all + noremap ggVG + imap + "ctrl+C to copy + map "+y + "ctrl+Y to redo + map + imap + imap + "ctrl+Z to undo + "map u "this clobbers UNIX ctrl+z to background vim + imap u + "ctrl+Q to save/quit + map :update\|q + imap +" } + +" common typos { + " Often I hold shift too long when issuing these commands. + command! Q q + command! Qall qall + command! W w + command! Wall wall + command! WQ wq + command! Wq wq + nmap Q: :q + + " this one causes a pause whenever you use q, so I don't use it + " nmap q: :q + + "never use Ex mode -- I never *mean* to press it + nnoremap Q + + "never use F1 -- I'm reaching for escape + noremap + noremap! + lnoremap +" } + +" multiple files { + " be smarter about multiple buffers / vim instances + "quick buffer switching with TAB, even with edited files + set hidden + nmap :bn + nmap :bp + set autoread "auto-reload files, if there's no conflict + set shortmess+=IA "no intro message, no swap-file message + + "replacement for CTRL-I, also known as + noremap + + "window switching: ctrl+[hjkl] + nnoremap j + nnoremap k + nnoremap h + nnoremap l + nnoremap q + + "tab switching: ctrl+left/right + nnoremap Od :tabp + nnoremap Oc :tabN +" } + +"indentation options { + set expandtab "use spaces, not tabs + set softtabstop=4 shiftwidth=4 "4-space indents + + + set shiftround "always use a multiple of 4 for indents + set smarttab "backspace to remove space-indents + set autoindent "auto-indent for code blocks + "DONT USE: smartindent "it does stupid things with comments + + "smart indenting by filetype, better than smartindent + filetype on + filetype indent on + filetype plugin on +" } + +"extra filetypes { + au BufNewFile,BufRead *.js.tmpl set filetype=javascript + au BufNewFile,BufRead *.css.tmpl set filetype=css + au BufNewFile,BufRead *.pxi set filetype=pyrex + au BufNewFile,BufRead *.md set filetype=markdown +" } + +" tkdiff-like bindings for vimdiff { + if &diff + "next match + nnoremap m ]cz. + "previous match + nnoremap M [cz. + "refresh the diff + nnoremap R :w\|set nodiff\|set diff + "quit, both panes + nnoremap q :qall + + "show me the top of the "new" file + autocmd VimEnter * normal lgg + endif +" } + +" My own extra stuff: +if filereadable($HOME . "/.vimrc.extra") + source $HOME/.vimrc.extra +endif + +set runtimepath^=~/.vim/bundle/ctrlp.vim + +filetype plugin indent on +syntax on +