add vim files

This commit is contained in:
bt3 2015-11-28 11:53:46 -08:00
parent 5780c0a231
commit ac9c955e0b
13 changed files with 323 additions and 14 deletions

View file

@ -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
######################################################

View file

@ -1,5 +1,3 @@
# from @ivanlei
# Change prefix key to Ctrl+p
# unbind C-b
# set -g prefix C-p

3
configs/vim/.netrwhist Normal file
View file

@ -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'

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

@ -0,0 +1 @@
Subproject commit 96c07746b46c12d0aca7a5276cc5bd0a260b82fe

@ -0,0 +1 @@
Subproject commit 9c8468e83232c3e45b730d2d0b28d609053dec05

@ -0,0 +1 @@
Subproject commit 78566c37aeb3b7609eee84a7b10114a0f512830e

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

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

View file

@ -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'

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

View file

@ -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"]

172
configs/vimrc Executable file
View file

@ -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 <c-s> :update<cr>
imap <c-s> <c-o><c-s>
"ctrl+A to select all
noremap <c-a> ggVG
imap <c-a> <esc><c-a>
"ctrl+C to copy
map <c-c> "+y
"ctrl+Y to redo
map <c-y> <c-r>
imap <c-y> <c-o><c-r>
imap <c-r> <c-o><c-r>
"ctrl+Z to undo
"map <c-z> u "this clobbers UNIX ctrl+z to background vim
imap <c-z> <c-o>u
"ctrl+Q to save/quit
map <c-q> :update\|q<cr>
imap <c-q> <c-o><c-q>
" }
" 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 <ESC>
"never use F1 -- I'm reaching for escape
noremap <F1> <ESC>
noremap! <F1> <ESC>
lnoremap <F1> <ESC>
" }
" multiple files {
" be smarter about multiple buffers / vim instances
"quick buffer switching with TAB, even with edited files
set hidden
nmap <TAB> :bn<CR>
nmap <S-TAB> :bp<CR>
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 <tab>
noremap <C-P> <C-I>
"window switching: ctrl+[hjkl]
nnoremap <C-J> <C-W>j
nnoremap <C-K> <C-W>k
nnoremap <C-H> <C-W>h
nnoremap <C-L> <C-W>l
nnoremap <C-Q> <C-W>q
"tab switching: ctrl+left/right
nnoremap Od :tabp<CR>
nnoremap Oc :tabN<CR>
" }
"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<cr>
"quit, both panes
nnoremap q :qall<cr>
"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