Compare commits
No commits in common. "579fee68fd8bcc629d79e7da561d7a8fc5b79b6d" and "7c3e1c7fae2fc0feaef130f9d9810faf3a96c043" have entirely different histories.
579fee68fd
...
7c3e1c7fae
33 changed files with 3 additions and 1046 deletions
|
@ -5,10 +5,3 @@ alias ls='ls --color=auto'
|
|||
|
||||
alias functions="grep \(\) ~/.bash_functions | grep -E -v '\#|\*'"
|
||||
alias Grep='grep'
|
||||
alias dict='/usr/bin/sdcv'
|
||||
alias wiki='/usr/bin/python2 ~/bin/mygit/misc_pytools/wikipedia_search/wikipedia_search.py'
|
||||
alias btc='curl -sSL https://coinbase.com/api/v1/prices/historical | head -n 1 | sed "s|^.*,|$|" | sed "s|\(\.[0-9]$\)|\10|"'
|
||||
alias rfc="/home/booboy/bin/mygit/rfc/rfc.sh"
|
||||
alias current_temp='python3 /home/booboy/bin/mygit/misc_pytools/get_weather/weather.py |grep "\"temp\":" | tr -d ','| column -t'
|
||||
alias vim='/usr/bin/nvim'
|
||||
alias vi='/usr/bin/nvim'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
[[ -f ~/.bash_functions ]] && . ~/.bash_functions
|
||||
[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
|
||||
|
|
23
.bashrc
23
.bashrc
|
@ -1,23 +0,0 @@
|
|||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
[[ -f ~/.bash_functions ]] && . ~/.bash_functions
|
||||
[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
|
||||
[[ -f ~/.envars ]] && . ~/.envars
|
||||
|
||||
source `which activate.sh` || echo 'install autoenv to properly use auto
|
||||
environment switching in python'
|
||||
|
||||
PATH="/usr/bin/core_perl:/home/booboy/.gem/ruby/2.5.0/bin:/home/booboy/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||
PERL5LIB="/home/booboy/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||
PERL_LOCAL_LIB_ROOT="/home/booboy/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||
PERL_MB_OPT="--install_base \"/home/booboy/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=/home/booboy/perl5"; export PERL_MM_OPT;
|
||||
export EDITOR="vim"
|
||||
export LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||
|
||||
source ~/.pastebin_key
|
|
@ -1,11 +1,6 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhist_cnt =9
|
||||
let g:netrw_dirhist_cnt =4
|
||||
let g:netrw_dirhist_1='/home/booboy/bin/git_programs/dotfiles/install'
|
||||
let g:netrw_dirhist_2='/home/booboy/bin/git/get_weather.py'
|
||||
let g:netrw_dirhist_3='/home/booboy/bin/git/get_weather/.git'
|
||||
let g:netrw_dirhist_4='/var/www/html/brendan.mcdevitt.tech/_layouts'
|
||||
let g:netrw_dirhist_5='/usr/local/vm/vagrant_scripts/.git'
|
||||
let g:netrw_dirhist_6='/etc/firewalld/services'
|
||||
let g:netrw_dirhist_7='/home/booboy/bin/mygit/security_python_scripts/.git'
|
||||
let g:netrw_dirhist_8='/home/booboy/bin/mygit/cryptobot/.git'
|
||||
let g:netrw_dirhist_9='/home/booboy/bin/mygit/misc_pytools/discord_chat_bot'
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
Subproject commit 9a38216a1c0c597f978d73547d37681fc689c90d
|
||||
Subproject commit 6437ad6df4a3e6a87c5fb8bd2b8aadb277ec9c87
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a172d7cfcb4fe9b927dcc24184204fc89d826301
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 40fe711e088e2ab346738233dd5adbb1be355172
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 4b93dffbd98fd3885ee7c4fcedaa65cf5b72f56d
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c66a6dab214e3944259acef423b924c994a853b9
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c96db6151fde9d06a8fed71b7df05c6dbb3f14fe
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 295862ba6be47ec3b11b6c85c10d982ffd9bc0b2
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3e0bd86b99c50691f830d9e25a4bbe2a88078f8f
|
|
@ -1 +0,0 @@
|
|||
Subproject commit bdb4454ab0dfb29d8b84b2515d77d013bed564d8
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 444123706d89685fe8a2fd2a7d21e0dd69500684
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 07635eee212a62889ebc3f3561fef458478ffcfd
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3f2951e107dcf72dd67ae56c6ba72ffb4c409520
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a9802f2351910f64b70fb10b63651e6ff6b8125e
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f02955d40b64c9db6f6bdeee40d0f44a00c58865
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 697f3e87eb10ca91d55152749fec4e7217ff754e
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 1568bf81281507aaaa8c71af85e244e94bd2924c
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a172d7cfcb4fe9b927dcc24184204fc89d826301
|
|
@ -1 +0,0 @@
|
|||
Subproject commit a172d7cfcb4fe9b927dcc24184204fc89d826301
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3f2951e107dcf72dd67ae56c6ba72ffb4c409520
|
|
@ -1,125 +0,0 @@
|
|||
" Tslime.vim. Send portion of buffer to tmux instance
|
||||
" Maintainer: C.Coutinho <kikijump [at] gmail [dot] com>
|
||||
" Licence: DWTFYWTPL
|
||||
|
||||
if exists("g:loaded_tslime") && g:loaded_tslime
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_tslime = 1
|
||||
|
||||
if !exists("g:tslime_ensure_trailing_newlines")
|
||||
let g:tslime_ensure_trailing_newlines = 0
|
||||
endif
|
||||
if !exists("g:tslime_normal_mapping")
|
||||
let g:tslime_normal_mapping = '<c-c><c-c>'
|
||||
endif
|
||||
if !exists("g:tslime_visual_mapping")
|
||||
let g:tslime_visual_mapping = '<c-c><c-c>'
|
||||
endif
|
||||
if !exists("g:tslime_vars_mapping")
|
||||
let g:tslime_vars_mapping = '<c-c>v'
|
||||
endif
|
||||
|
||||
" Main function.
|
||||
" Use it in your script if you want to send text to a tmux session.
|
||||
function! Send_to_Tmux(text)
|
||||
if !exists("b:tmux_sessionname") || !exists("b:tmux_windowname") || !exists("b:tmux_panenumber")
|
||||
if exists("g:tmux_sessionname") && exists("g:tmux_windowname") && exists("g:tmux_panenumber")
|
||||
let b:tmux_sessionname = g:tmux_sessionname
|
||||
let b:tmux_windowname = g:tmux_windowname
|
||||
let b:tmux_panenumber = g:tmux_panenumber
|
||||
else
|
||||
call <SID>Tmux_Vars()
|
||||
end
|
||||
end
|
||||
|
||||
let target = b:tmux_sessionname . ":" . b:tmux_windowname . "." . b:tmux_panenumber
|
||||
|
||||
" Look, I know this is horrifying. I'm sorry.
|
||||
"
|
||||
" THE PROBLEM: Certain REPLs (e.g.: SBCL) choke if you paste an assload of
|
||||
" text into them all at once (where 'assload' is 'something more than a few
|
||||
" hundred characters but fewer than eight thousand'). They'll seem to get out
|
||||
" of sync with the paste, and your code gets mangled.
|
||||
"
|
||||
" THE SOLUTION: We paste a single line at a time, and sleep for a bit in
|
||||
" between each one. This gives the REPL time to process things and stay
|
||||
" caught up. 2 milliseconds seems to be enough of a sleep to avoid breaking
|
||||
" things and isn't too painful to sit through.
|
||||
"
|
||||
" This is my life. This is computering in 2014.
|
||||
for line in split(a:text, '\n\zs' )
|
||||
call <SID>set_tmux_buffer(line)
|
||||
call system("tmux paste-buffer -dpt " . target)
|
||||
sleep 2m
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! s:ensure_newlines(text)
|
||||
let text = a:text
|
||||
let trailing_newlines = matchstr(text, '\v\n*$')
|
||||
let spaces_to_add = g:tslime_ensure_trailing_newlines - strlen(trailing_newlines)
|
||||
|
||||
while spaces_to_add > 0
|
||||
let spaces_to_add -= 1
|
||||
let text .= "\n"
|
||||
endwhile
|
||||
|
||||
return text
|
||||
endfunction
|
||||
|
||||
function! s:set_tmux_buffer(text)
|
||||
call system("tmux set-buffer -- '" . substitute(a:text, "'", "'\\\\''", 'g') . "'")
|
||||
endfunction
|
||||
|
||||
function! SendToTmux(text)
|
||||
call Send_to_Tmux(s:ensure_newlines(a:text))
|
||||
endfunction
|
||||
|
||||
function! SendToTmuxRaw(text)
|
||||
call Send_to_Tmux(a:text)
|
||||
endfunction
|
||||
|
||||
" Session completion
|
||||
function! Tmux_Session_Names(A,L,P)
|
||||
return system("tmux list-sessions | sed -e 's/:.*$//'")
|
||||
endfunction
|
||||
|
||||
" Window completion
|
||||
function! Tmux_Window_Names(A,L,P)
|
||||
return system("tmux list-windows -t" . b:tmux_sessionname . ' | grep -e "^\w:" | sed -e "s/ \[[0-9x]*\]$//"')
|
||||
endfunction
|
||||
|
||||
" Pane completion
|
||||
function! Tmux_Pane_Numbers(A,L,P)
|
||||
return system("tmux list-panes -t " . b:tmux_sessionname . ":" . b:tmux_windowname . " | sed -e 's/:.*$//'")
|
||||
endfunction
|
||||
|
||||
" set tslime.vim variables
|
||||
function! s:Tmux_Vars()
|
||||
let b:tmux_sessionname = ''
|
||||
while b:tmux_sessionname == ''
|
||||
let b:tmux_sessionname = input("session name: ", "", "custom,Tmux_Session_Names")
|
||||
endwhile
|
||||
let b:tmux_windowname = substitute(input("window name: ", "", "custom,Tmux_Window_Names"), ":.*$" , '', 'g')
|
||||
let b:tmux_panenumber = input("pane number: ", "", "custom,Tmux_Pane_Numbers")
|
||||
|
||||
if b:tmux_windowname == ''
|
||||
let b:tmux_windowname = '0'
|
||||
endif
|
||||
|
||||
if b:tmux_panenumber == ''
|
||||
let b:tmux_panenumber = '0'
|
||||
endif
|
||||
|
||||
let g:tmux_sessionname = b:tmux_sessionname
|
||||
let g:tmux_windowname = b:tmux_windowname
|
||||
let g:tmux_panenumber = b:tmux_panenumber
|
||||
endfunction
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
execute "vnoremap" . g:tslime_visual_mapping . ' "ry:call Send_to_Tmux(@r)<CR>'
|
||||
execute "nnoremap" . g:tslime_normal_mapping . ' vip"ry:call Send_to_Tmux(@r)<CR>'
|
||||
execute "nnoremap" . g:tslime_vars_mapping . ' :call <SID>Tmux_Vars()<CR>'
|
15
.vimrc
15
.vimrc
|
@ -52,19 +52,4 @@ set softtabstop=4 " insert/delete 4 spaces when hitting a TAB/BACKSPACE
|
|||
set autoindent " align the new line indent with the previous line
|
||||
set fileformat=unix
|
||||
|
||||
" markdown preview plugin
|
||||
Plugin 'JamshedVesuna/vim-markdown-preview'
|
||||
Plugin 'heavenshell/vim-pydocstring'
|
||||
|
||||
set encoding=utf-8
|
||||
let g:syntastic_check_on_open = 1
|
||||
|
||||
|
||||
" Uncomment the following to have Vim jump to the last position when
|
||||
" reopening a file
|
||||
if has("autocmd")
|
||||
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
||||
\| exe "normal! g'\"" | endif
|
||||
endif
|
||||
|
||||
autocmd filetype lisp,scheme,art setlocal equalprg=scmindent.rkt
|
||||
|
|
14
.xonshrc
14
.xonshrc
|
@ -1,14 +0,0 @@
|
|||
alias l='ls -lah'
|
||||
alias ll='ls -lah'
|
||||
|
||||
$XONSH_COLOR_STYLE='vim'
|
||||
|
||||
# Coloured man page support
|
||||
# using 'less' env vars (format is '\E[<brightness>;<colour>m')
|
||||
$LESS_TERMCAP_mb = "\033[01;31m" # begin blinking
|
||||
$LESS_TERMCAP_md = "\033[01;31m" # begin bold
|
||||
$LESS_TERMCAP_me = "\033[0m" # end mode
|
||||
$LESS_TERMCAP_so = "\033[01;44;36m" # begin standout-mode (bottom of screen)
|
||||
$LESS_TERMCAP_se = "\033[0m" # end standout-mode
|
||||
$LESS_TERMCAP_us = "\033[00;36m" # begin underline
|
||||
$LESS_TERMCAP_ue = "\033[0m" # end underline
|
549
emacs/.spacemacs
549
emacs/.spacemacs
|
@ -1,549 +0,0 @@
|
|||
;; -*- mode: emacs-lisp -*-
|
||||
;; This file is loaded by Spacemacs at startup.
|
||||
;; It must be stored in your home directory.
|
||||
|
||||
(defun dotspacemacs/layers ()
|
||||
"Layer configuration:
|
||||
This function should only modify configuration layer settings."
|
||||
(setq-default
|
||||
;; Base distribution to use. This is a layer contained in the directory
|
||||
;; `+distribution'. For now available distributions are `spacemacs-base'
|
||||
;; or `spacemacs'. (default 'spacemacs)
|
||||
dotspacemacs-distribution 'spacemacs
|
||||
|
||||
;; Lazy installation of layers (i.e. layers are installed only when a file
|
||||
;; with a supported type is opened). Possible values are `all', `unused'
|
||||
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
|
||||
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
|
||||
;; lazy install any layer that support lazy installation even the layers
|
||||
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
|
||||
;; installation feature and you have to explicitly list a layer in the
|
||||
;; variable `dotspacemacs-configuration-layers' to install it.
|
||||
;; (default 'unused)
|
||||
dotspacemacs-enable-lazy-installation 'unused
|
||||
|
||||
;; If non-nil then Spacemacs will ask for confirmation before installing
|
||||
;; a layer lazily. (default t)
|
||||
dotspacemacs-ask-for-lazy-installation t
|
||||
|
||||
;; If non-nil layers with lazy install support are lazy installed.
|
||||
;; List of additional paths where to look for configuration layers.
|
||||
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
|
||||
dotspacemacs-configuration-layer-path '()
|
||||
|
||||
;; List of configuration layers to load.
|
||||
dotspacemacs-configuration-layers
|
||||
'(html
|
||||
javascript
|
||||
;; ----------------------------------------------------------------
|
||||
;; Example of useful layers you may want to use right away.
|
||||
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
|
||||
;; `M-m f e R' (Emacs style) to install them.
|
||||
;; ----------------------------------------------------------------
|
||||
ruby
|
||||
python
|
||||
scheme
|
||||
restclient
|
||||
helm
|
||||
auto-completion
|
||||
better-defaults
|
||||
emacs-lisp
|
||||
git
|
||||
markdown
|
||||
neotree
|
||||
(org :variables
|
||||
org-enable-github-support t
|
||||
org-enable-reveal-js-support t
|
||||
org-enable-org-journal-support t)
|
||||
confluence
|
||||
(shell :variables
|
||||
shell-default-height 30
|
||||
shell-default-position 'bottom)
|
||||
syntax-checking
|
||||
themes-megapack
|
||||
version-control
|
||||
)
|
||||
|
||||
;; List of additional packages that will be installed without being
|
||||
;; wrapped in a layer. If you need some configuration for these
|
||||
;; packages, then consider creating a layer. You can also put the
|
||||
;; configuration in `dotspacemacs/user-config'.
|
||||
;; To use a local version of a package, use the `:location' property:
|
||||
;; '(your-package :location "~/path/to/your-package/")
|
||||
;; Also include the dependencies as they will not be resolved automatically.
|
||||
dotspacemacs-additional-packages '()
|
||||
|
||||
;; A list of packages that cannot be updated.
|
||||
dotspacemacs-frozen-packages '()
|
||||
|
||||
;; A list of packages that will not be installed and loaded.
|
||||
dotspacemacs-excluded-packages '()
|
||||
|
||||
;; Defines the behaviour of Spacemacs when installing packages.
|
||||
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
|
||||
;; `used-only' installs only explicitly used packages and deletes any unused
|
||||
;; packages as well as their unused dependencies. `used-but-keep-unused'
|
||||
;; installs only the used packages but won't delete unused ones. `all'
|
||||
;; installs *all* packages supported by Spacemacs and never uninstalls them.
|
||||
;; (default is `used-only')
|
||||
dotspacemacs-install-packages 'used-only))
|
||||
|
||||
(defun dotspacemacs/init ()
|
||||
"Initialization:
|
||||
This function is called at the very beginning of Spacemacs startup,
|
||||
before layer configuration.
|
||||
It should only modify the values of Spacemacs settings."
|
||||
;; This setq-default sexp is an exhaustive list of all the supported
|
||||
;; spacemacs settings.
|
||||
(setq-default
|
||||
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
|
||||
;; possible. Set it to nil if you have no way to use HTTPS in your
|
||||
;; environment, otherwise it is strongly recommended to let it set to t.
|
||||
;; This variable has no effect if Emacs is launched with the parameter
|
||||
;; `--insecure' which forces the value of this variable to nil.
|
||||
;; (default t)
|
||||
dotspacemacs-elpa-https t
|
||||
|
||||
;; Maximum allowed time in seconds to contact an ELPA repository.
|
||||
;; (default 5)
|
||||
dotspacemacs-elpa-timeout 5
|
||||
|
||||
;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
|
||||
;; This is an advanced option and should not be changed unless you suspect
|
||||
;; performance issues due to garbage collection operations.
|
||||
;; (default '(100000000 0.1))
|
||||
dotspacemacs-gc-cons '(100000000 0.1)
|
||||
|
||||
;; If non-nil then Spacelpa repository is the primary source to install
|
||||
;; a locked version of packages. If nil then Spacemacs will install the
|
||||
;; latest version of packages from MELPA. (default nil)
|
||||
dotspacemacs-use-spacelpa nil
|
||||
|
||||
;; If non-nil then verify the signature for downloaded Spacelpa archives.
|
||||
;; (default nil)
|
||||
dotspacemacs-verify-spacelpa-archives nil
|
||||
|
||||
;; If non-nil then spacemacs will check for updates at startup
|
||||
;; when the current branch is not `develop'. Note that checking for
|
||||
;; new versions works via git commands, thus it calls GitHub services
|
||||
;; whenever you start Emacs. (default nil)
|
||||
dotspacemacs-check-for-update nil
|
||||
|
||||
;; If non-nil, a form that evaluates to a package directory. For example, to
|
||||
;; use different package directories for different Emacs versions, set this
|
||||
;; to `emacs-version'. (default 'emacs-version)
|
||||
dotspacemacs-elpa-subdirectory 'emacs-version
|
||||
|
||||
;; One of `vim', `emacs' or `hybrid'.
|
||||
;; `hybrid' is like `vim' except that `insert state' is replaced by the
|
||||
;; `hybrid state' with `emacs' key bindings. The value can also be a list
|
||||
;; with `:variables' keyword (similar to layers). Check the editing styles
|
||||
;; section of the documentation for details on available variables.
|
||||
;; (default 'vim)
|
||||
dotspacemacs-editing-style 'vim
|
||||
|
||||
;; If non-nil output loading progress in `*Messages*' buffer. (default nil)
|
||||
dotspacemacs-verbose-loading nil
|
||||
|
||||
;; Specify the startup banner. Default value is `official', it displays
|
||||
;; the official spacemacs logo. An integer value is the index of text
|
||||
;; banner, `random' chooses a random text banner in `core/banners'
|
||||
;; directory. A string value must be a path to an image format supported
|
||||
;; by your Emacs build.
|
||||
;; If the value is nil then no banner is displayed. (default 'official)
|
||||
dotspacemacs-startup-banner 'official
|
||||
|
||||
;; List of items to show in startup buffer or an association list of
|
||||
;; the form `(list-type . list-size)`. If nil then it is disabled.
|
||||
;; Possible values for list-type are:
|
||||
;; `recents' `bookmarks' `projects' `agenda' `todos'.
|
||||
;; List sizes may be nil, in which case
|
||||
;; `spacemacs-buffer-startup-lists-length' takes effect.
|
||||
dotspacemacs-startup-lists '((recents . 5)
|
||||
(projects . 7))
|
||||
|
||||
;; True if the home buffer should respond to resize events. (default t)
|
||||
dotspacemacs-startup-buffer-responsive t
|
||||
|
||||
;; Default major mode of the scratch buffer (default `text-mode')
|
||||
dotspacemacs-scratch-mode 'text-mode
|
||||
|
||||
;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
|
||||
;; (default nil)
|
||||
dotspacemacs-initial-scratch-message nil
|
||||
|
||||
;; List of themes, the first of the list is loaded when spacemacs starts.
|
||||
;; Press `SPC T n' to cycle to the next theme in the list (works great
|
||||
;; with 2 themes variants, one dark and one light)
|
||||
dotspacemacs-themes '(madhat2r
|
||||
spacemacs-dark
|
||||
spacemacs-light)
|
||||
|
||||
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
|
||||
;; `all-the-icons', `custom', `vim-powerline' and `vanilla'. The first three
|
||||
;; are spaceline themes. `vanilla' is default Emacs mode-line. `custom' is a
|
||||
;; user defined themes, refer to the DOCUMENTATION.org for more info on how
|
||||
;; to create your own spaceline theme. Value can be a symbol or list with\
|
||||
;; additional properties.
|
||||
;; (default '(spacemacs :separator wave :separator-scale 1.5))
|
||||
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
|
||||
|
||||
;; If non-nil the cursor color matches the state color in GUI Emacs.
|
||||
;; (default t)
|
||||
dotspacemacs-colorize-cursor-according-to-state t
|
||||
|
||||
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
|
||||
;; quickly tweak the mode-line size to make separators look not too crappy.
|
||||
dotspacemacs-default-font '("Source Code Pro"
|
||||
:size 13
|
||||
:weight normal
|
||||
:width normal)
|
||||
|
||||
;; The leader key (default "SPC")
|
||||
dotspacemacs-leader-key "SPC"
|
||||
|
||||
;; The key used for Emacs commands `M-x' (after pressing on the leader key).
|
||||
;; (default "SPC")
|
||||
dotspacemacs-emacs-command-key "SPC"
|
||||
|
||||
;; The key used for Vim Ex commands (default ":")
|
||||
dotspacemacs-ex-command-key ":"
|
||||
|
||||
;; The leader key accessible in `emacs state' and `insert state'
|
||||
;; (default "M-m")
|
||||
dotspacemacs-emacs-leader-key "M-m"
|
||||
|
||||
;; Major mode leader key is a shortcut key which is the equivalent of
|
||||
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
|
||||
dotspacemacs-major-mode-leader-key ","
|
||||
|
||||
;; Major mode leader key accessible in `emacs state' and `insert state'.
|
||||
;; (default "C-M-m")
|
||||
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
|
||||
|
||||
;; These variables control whether separate commands are bound in the GUI to
|
||||
;; the key pairs `C-i', `TAB' and `C-m', `RET'.
|
||||
;; Setting it to a non-nil value, allows for separate commands under `C-i'
|
||||
;; and TAB or `C-m' and `RET'.
|
||||
;; In the terminal, these pairs are generally indistinguishable, so this only
|
||||
;; works in the GUI. (default nil)
|
||||
dotspacemacs-distinguish-gui-tab nil
|
||||
|
||||
;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil)
|
||||
dotspacemacs-remap-Y-to-y$ nil
|
||||
|
||||
;; If non-nil, the shift mappings `<' and `>' retain visual state if used
|
||||
;; there. (default t)
|
||||
dotspacemacs-retain-visual-state-on-shift t
|
||||
|
||||
;; If non-nil, `J' and `K' move lines up and down when in visual mode.
|
||||
;; (default nil)
|
||||
dotspacemacs-visual-line-move-text nil
|
||||
|
||||
;; If non-nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
|
||||
;; (default nil)
|
||||
dotspacemacs-ex-substitute-global nil
|
||||
|
||||
;; Name of the default layout (default "Default")
|
||||
dotspacemacs-default-layout-name "Default"
|
||||
|
||||
;; If non-nil the default layout name is displayed in the mode-line.
|
||||
;; (default nil)
|
||||
dotspacemacs-display-default-layout nil
|
||||
|
||||
;; If non-nil then the last auto saved layouts are resumed automatically upon
|
||||
;; start. (default nil)
|
||||
dotspacemacs-auto-resume-layouts nil
|
||||
|
||||
;; If non-nil, auto-generate layout name when creating new layouts. Only has
|
||||
;; effect when using the "jump to layout by number" commands. (default nil)
|
||||
dotspacemacs-auto-generate-layout-names nil
|
||||
|
||||
;; Size (in MB) above which spacemacs will prompt to open the large file
|
||||
;; literally to avoid performance issues. Opening a file literally means that
|
||||
;; no major mode or minor modes are active. (default is 1)
|
||||
dotspacemacs-large-file-size 1
|
||||
|
||||
;; Location where to auto-save files. Possible values are `original' to
|
||||
;; auto-save the file in-place, `cache' to auto-save the file to another
|
||||
;; file stored in the cache directory and `nil' to disable auto-saving.
|
||||
;; (default 'cache)
|
||||
dotspacemacs-auto-save-file-location 'cache
|
||||
|
||||
;; Maximum number of rollback slots to keep in the cache. (default 5)
|
||||
dotspacemacs-max-rollback-slots 5
|
||||
|
||||
;; If non-nil, `helm' will try to minimize the space it uses. (default nil)
|
||||
dotspacemacs-helm-resize nil
|
||||
|
||||
;; if non-nil, the helm header is hidden when there is only one source.
|
||||
;; (default nil)
|
||||
dotspacemacs-helm-no-header nil
|
||||
|
||||
;; define the position to display `helm', options are `bottom', `top',
|
||||
;; `left', or `right'. (default 'bottom)
|
||||
dotspacemacs-helm-position 'bottom
|
||||
|
||||
;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
|
||||
;; in all non-asynchronous sources. If set to `source', preserve individual
|
||||
;; source settings. Else, disable fuzzy matching in all sources.
|
||||
;; (default 'always)
|
||||
dotspacemacs-helm-use-fuzzy 'always
|
||||
|
||||
;; If non-nil, the paste transient-state is enabled. While enabled, pressing
|
||||
;; `p' several times cycles through the elements in the `kill-ring'.
|
||||
;; (default nil)
|
||||
dotspacemacs-enable-paste-transient-state nil
|
||||
|
||||
;; Which-key delay in seconds. The which-key buffer is the popup listing
|
||||
;; the commands bound to the current keystroke sequence. (default 0.4)
|
||||
dotspacemacs-which-key-delay 0.4
|
||||
|
||||
;; Which-key frame position. Possible values are `right', `bottom' and
|
||||
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
|
||||
;; right; if there is insufficient space it displays it at the bottom.
|
||||
;; (default 'bottom)
|
||||
dotspacemacs-which-key-position 'bottom
|
||||
|
||||
;; Control where `switch-to-buffer' displays the buffer. If nil,
|
||||
;; `switch-to-buffer' displays the buffer in the current window even if
|
||||
;; another same-purpose window is available. If non-nil, `switch-to-buffer'
|
||||
;; displays the buffer in a same-purpose window even if the buffer can be
|
||||
;; displayed in the current window. (default nil)
|
||||
dotspacemacs-switch-to-buffer-prefers-purpose nil
|
||||
|
||||
;; If non-nil a progress bar is displayed when spacemacs is loading. This
|
||||
;; may increase the boot time on some systems and emacs builds, set it to
|
||||
;; nil to boost the loading time. (default t)
|
||||
dotspacemacs-loading-progress-bar t
|
||||
|
||||
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
|
||||
;; (Emacs 24.4+ only)
|
||||
dotspacemacs-fullscreen-at-startup nil
|
||||
|
||||
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
|
||||
;; Use to disable fullscreen animations in OSX. (default nil)
|
||||
dotspacemacs-fullscreen-use-non-native nil
|
||||
|
||||
;; If non-nil the frame is maximized when Emacs starts up.
|
||||
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
|
||||
;; (default nil) (Emacs 24.4+ only)
|
||||
dotspacemacs-maximized-at-startup nil
|
||||
|
||||
;; A value from the range (0..100), in increasing opacity, which describes
|
||||
;; the transparency level of a frame when it's active or selected.
|
||||
;; Transparency can be toggled through `toggle-transparency'. (default 90)
|
||||
dotspacemacs-active-transparency 90
|
||||
|
||||
;; A value from the range (0..100), in increasing opacity, which describes
|
||||
;; the transparency level of a frame when it's inactive or deselected.
|
||||
;; Transparency can be toggled through `toggle-transparency'. (default 90)
|
||||
dotspacemacs-inactive-transparency 90
|
||||
|
||||
;; If non-nil show the titles of transient states. (default t)
|
||||
dotspacemacs-show-transient-state-title t
|
||||
|
||||
;; If non-nil show the color guide hint for transient state keys. (default t)
|
||||
dotspacemacs-show-transient-state-color-guide t
|
||||
|
||||
;; If non-nil unicode symbols are displayed in the mode line. (default t)
|
||||
dotspacemacs-mode-line-unicode-symbols t
|
||||
|
||||
;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
|
||||
;; scrolling overrides the default behavior of Emacs which recenters point
|
||||
;; when it reaches the top or bottom of the screen. (default t)
|
||||
dotspacemacs-smooth-scrolling t
|
||||
|
||||
;; Control line numbers activation.
|
||||
;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
|
||||
;; `text-mode' derivatives. If set to `relative', line numbers are relative.
|
||||
;; This variable can also be set to a property list for finer control:
|
||||
;; '(:relative nil
|
||||
;; :disabled-for-modes dired-mode
|
||||
;; doc-view-mode
|
||||
;; markdown-mode
|
||||
;; org-mode
|
||||
;; pdf-view-mode
|
||||
;; text-mode
|
||||
;; :size-limit-kb 1000)
|
||||
;; (default nil)
|
||||
dotspacemacs-line-numbers t
|
||||
|
||||
;; Code folding method. Possible values are `evil' and `origami'.
|
||||
;; (default 'evil)
|
||||
dotspacemacs-folding-method 'evil
|
||||
|
||||
;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
|
||||
;; (default nil)
|
||||
dotspacemacs-smartparens-strict-mode nil
|
||||
|
||||
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
|
||||
;; over any automatically added closing parenthesis, bracket, quote, etc…
|
||||
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
|
||||
dotspacemacs-smart-closing-parenthesis nil
|
||||
|
||||
;; Select a scope to highlight delimiters. Possible values are `any',
|
||||
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
|
||||
;; emphasis the current one). (default 'all)
|
||||
dotspacemacs-highlight-delimiters 'all
|
||||
|
||||
;; If non-nil, start an Emacs server if one is not already running.
|
||||
dotspacemacs-enable-server t
|
||||
|
||||
;; If non-nil, advise quit functions to keep server open when quitting.
|
||||
;; (default nil)
|
||||
dotspacemacs-persistent-server nil
|
||||
|
||||
;; List of search tool executable names. Spacemacs uses the first installed
|
||||
;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
|
||||
;; (default '("rg" "ag" "pt" "ack" "grep"))
|
||||
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
|
||||
|
||||
;; Format specification for setting the frame title.
|
||||
;; %a - the `abbreviated-file-name', or `buffer-name'
|
||||
;; %t - `projectile-project-name'
|
||||
;; %I - `invocation-name'
|
||||
;; %S - `system-name'
|
||||
;; %U - contents of $USER
|
||||
;; %b - buffer name
|
||||
;; %f - visited file name
|
||||
;; %F - frame name
|
||||
;; %s - process status
|
||||
;; %p - percent of buffer above top of window, or Top, Bot or All
|
||||
;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
|
||||
;; %m - mode name
|
||||
;; %n - Narrow if appropriate
|
||||
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
|
||||
;; %Z - like %z, but including the end-of-line format
|
||||
;; (default "%I@%S")
|
||||
dotspacemacs-frame-title-format "%I@%S"
|
||||
|
||||
;; Format specification for setting the icon title format
|
||||
;; (default nil - same as frame-title-format)
|
||||
dotspacemacs-icon-title-format nil
|
||||
|
||||
;; Delete whitespace while saving buffer. Possible values are `all'
|
||||
;; to aggressively delete empty line and long sequences of whitespace,
|
||||
;; `trailing' to delete only the whitespace at end of lines, `changed' to
|
||||
;; delete only whitespace for changed lines or `nil' to disable cleanup.
|
||||
;; (default nil)
|
||||
dotspacemacs-whitespace-cleanup nil
|
||||
|
||||
;; Either nil or a number of seconds. If non-nil zone out after the specified
|
||||
;; number of seconds. (default nil)
|
||||
dotspacemacs-zone-out-when-idle nil
|
||||
|
||||
;; Run `spacemacs/prettify-org-buffer' when
|
||||
;; visiting README.org files of Spacemacs.
|
||||
;; (default nil)
|
||||
dotspacemacs-pretty-docs nil))
|
||||
|
||||
(defun dotspacemacs/user-init ()
|
||||
"Initialization for user code:
|
||||
This function is called immediately after `dotspacemacs/init', before layer
|
||||
configuration.
|
||||
It is mostly for variables that should be set before packages are loaded.
|
||||
If you are unsure, try setting them in `dotspacemacs/user-config' first."
|
||||
)
|
||||
|
||||
(defun dotspacemacs/user-config ()
|
||||
"Configuration for user code:
|
||||
This function is called at the very end of Spacemacs startup, after layer
|
||||
configuration.
|
||||
Put your configuration code here, except for variables that should be set
|
||||
before packages are loaded."
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((scheme . t)
|
||||
(ruby . t)
|
||||
(python . t)
|
||||
(shell . t)
|
||||
(awk . t)
|
||||
(gnuplot . t)
|
||||
(sql . t)
|
||||
(http . t)))
|
||||
)
|
||||
;; Do not write anything past this comment. This is where Emacs will
|
||||
;; auto-generate custom variable definitions.
|
||||
(defun dotspacemacs/emacs-custom-settings ()
|
||||
"Emacs custom settings.
|
||||
This is an auto-generated function, do not modify its content directly, use
|
||||
Emacs customize menu instead.
|
||||
This function is called at the very end of Spacemacs initialization."
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(zenburn-theme zen-and-art-theme yapfify white-sand-theme web-mode web-beautify underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme toxi-theme tao-theme tangotango-theme tango-plus-theme tango-2-theme tagedit sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme slim-mode seti-theme scss-mode sass-mode rvm ruby-tools ruby-test-mode ruby-refactor ruby-hash-syntax rubocop rspec-mode robe reverse-theme rebecca-theme rbenv rake railscasts-theme pyvenv pytest pyenv-mode py-isort purple-haze-theme pug-mode professional-theme planet-theme pippel pipenv pip-requirements phoenix-dark-pink-theme phoenix-dark-mono-theme ox-reveal ox-gfm organic-green-theme org-journal omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme naquadah-theme mustang-theme monokai-theme monochrome-theme molokai-theme moe-theme minitest minimal-theme material-theme majapahit-theme madhat2r-theme lush-theme livid-mode skewer-mode live-py-mode light-soap-theme kaolin-themes json-navigator hierarchy json-mode json-snatcher json-reformat js2-refactor multiple-cursors js2-mode js-doc jbeans-theme jazz-theme ir-black-theme inkpot-theme importmagic epc ctable concurrent deferred impatient-mode simple-httpd heroku-theme hemisu-theme helm-pydoc helm-css-scss hc-zenburn-theme haml-mode gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme geiser gandalf-theme flatui-theme flatland-theme farmhouse-theme eziam-theme exotica-theme espresso-theme emmet-mode dracula-theme doom-themes django-theme darktooth-theme autothemer darkokai-theme darkmine-theme darkburn-theme dakrone-theme cython-mode cyberpunk-theme confluence xml-rpc company-web web-completion-data company-tern dash-functional tern company-anaconda color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized clues-theme chruby cherry-blossom-theme busybee-theme bundler inf-ruby bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme apropospriate-theme anti-zenburn-theme anaconda-mode pythonic ample-zen-theme ample-theme alect-themes afternoon-theme yasnippet-snippets xterm-color ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package unfill toc-org symon string-inflection spaceline-all-the-icons smeargle shell-pop restclient-helm restart-emacs rainbow-delimiters popwin persp-mode pcre2el password-generator paradox overseer orgit org-projectile org-present org-pomodoro org-mime org-download org-bullets org-brain open-junk-file ob-restclient ob-http neotree nameless mwim multi-term move-text mmm-mode markdown-toc magit-svn magit-gitflow macrostep lorem-ipsum link-hint indent-guide hungry-delete htmlize hl-todo highlight-parentheses highlight-numbers highlight-indentation helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-mode-manager helm-make helm-gitignore helm-flx helm-descbinds helm-company helm-c-yasnippet helm-ag google-translate golden-ratio gnuplot gitignore-templates gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe git-gutter-fringe+ gh-md fuzzy font-lock+ flycheck-pos-tip flx-ido fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-org evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-cleverparens evil-args evil-anzu eval-sexp-fu eshell-z eshell-prompt-extras esh-help elisp-slime-nav editorconfig dumb-jump dotenv-mode diminish diff-hl define-word counsel-projectile company-statistics company-restclient column-enforce-mode clean-aindent-mode centered-cursor-mode browse-at-remote auto-yasnippet auto-highlight-symbol auto-compile aggressive-indent ace-window ace-link ace-jump-helm-line ac-ispell))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(default ((t (:background nil)))))
|
||||
)
|
||||
|
||||
(defun open-localhost ()
|
||||
(interactive)
|
||||
(ansi-term "bash" "localhost"))
|
||||
|
||||
(defun wikipedia-search ()
|
||||
(interactive)
|
||||
(let* ((term (read-from-minibuffer "Search Term:"))
|
||||
(buffer (generate-new-buffer (concat "*Wikipedia*" term))))
|
||||
|
||||
(shell-command (concat "/home/booboy/bin/wikipedia_search.rb" " '" term "'")buffer)))
|
||||
|
||||
(defun owasp-search ()
|
||||
(interactive)
|
||||
(let* ((term (read-from-minibuffer "Search Term: "))
|
||||
(buffer (generate-new-buffer (concat "*Owasp*" term))))
|
||||
|
||||
(shell-command (concat "/home/booboy/bin/owasp_search.rb" " '" term "'")buffer)))
|
||||
|
||||
(defun url-decode-region (start end)
|
||||
"Replace a region with the same contents, only URL decoded."
|
||||
(interactive "r")
|
||||
(let ((text (url-unhex-string (buffer-substring start end))))
|
||||
(delete-region start end)
|
||||
(insert text)))
|
||||
|
||||
(defun encode-percent-encoded-url ()
|
||||
"Percent encode URL under cursor or selection.
|
||||
Example:
|
||||
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)
|
||||
becomes
|
||||
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(D%C3%BCrer)
|
||||
Example:
|
||||
http://zh.wikipedia.org/wiki/文本编辑器
|
||||
becomes
|
||||
http://zh.wikipedia.org/wiki/%E6%96%87%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8
|
||||
URL `http://ergoemacs.org/emacs/elisp_decode_uri_percent_encoding.html'
|
||||
Version 2015-09-14."
|
||||
(interactive)
|
||||
(let ($boundaries $p1 $p2 $input-str)
|
||||
(if (use-region-p)
|
||||
(progn
|
||||
(setq $p1 (region-beginning))
|
||||
(setq $p2 (region-end)))
|
||||
(progn
|
||||
(setq $boundaries (bounds-of-thing-at-point 'url))
|
||||
(setq $p1 (car $boundaries))
|
||||
(setq $p2 (cdr $boundaries))))
|
||||
(setq $input-str (buffer-substring-no-properties $p1 $p2))
|
||||
(require 'url-util)
|
||||
(delete-region $p1 $p2)
|
||||
(insert (url-encode-url $input-str))))
|
||||
|
||||
(defun url-encode-region (start end)
|
||||
"Replace a region with the same contents, only URL encoded."
|
||||
(interactive "r")
|
||||
(let ((text (url-hexify-string (buffer-substring start end))))
|
||||
(delete-region start end)
|
||||
(insert text)))
|
||||
|
||||
;; bind f8 to open new terminal in new buffer
|
||||
( global-set-key ( kbd "<f8>") 'open-localhost)
|
252
emacs/get-rfc.el
252
emacs/get-rfc.el
|
@ -1,252 +0,0 @@
|
|||
;;; get-rfc.el --- Getting and viewing RFCs
|
||||
|
||||
;; This file is NOT part of Emacs.
|
||||
|
||||
;; Copyright (C) 2002, 2003, 2011 Lawrence Mitchell <wence@gmx.li>
|
||||
;; Filename: get-rfc.el
|
||||
;; Version: 1.14
|
||||
;; Author: Lawrence Mitchell <wence@gmx.li>
|
||||
;; Created: 2002-04-16
|
||||
;; Keywords: convenience RFCs
|
||||
|
||||
;; COPYRIGHT NOTICE
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 2 of the License, or (at
|
||||
;; your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
;; for more details. http://www.gnu.org/copyleft/gpl.html
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If you did not, write to the Free Software
|
||||
;; Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.
|
||||
|
||||
;;; Commentary:
|
||||
;; This is a tiny little package to alleviate the pain of having to
|
||||
;; switch out of Emacs if you want to view an RFC.
|
||||
;; It prompts you for a RFC number and pops up a new buffer with said RFC.
|
||||
;; You can specify whether you want to find RFCs locally or on the
|
||||
;; internet, in either case the RFC is still opened in Emacs.
|
||||
;;
|
||||
;; Note, you need a working wget type program to get a remote RFC and
|
||||
;; view it in Emacs. If you don't have one, set the variable
|
||||
;; `get-rfc-no-wget' to t (in this case, a browser will be opened up
|
||||
;; to view the RFC.)
|
||||
;;
|
||||
;; If you do view RFCs in Emacs, rfcview.el is a useful package that
|
||||
;; formats them nicely, available at
|
||||
;; <URL:http://www.neilvandyke.org/rfcview/rfcview.el>
|
||||
;;
|
||||
;; Two commands are provided:
|
||||
;; `get-rfc-view-rfc' -- Prompts for an RFC number and then displays
|
||||
;; it in a new frame.
|
||||
;; `get-rfc-view-rfc-at-point' -- Displays the RFC number at point in
|
||||
;; a new frame.
|
||||
;; `get-rfc-grep-rfc-index' -- Greps for the occurrence of a string in
|
||||
;; the file rfc-index.txt.
|
||||
;;
|
||||
;; To use this file, place it somewhere in your load path, and then
|
||||
;; add the following to your .emacs
|
||||
;; (autoload 'get-rfc-view-rfc "get-rfc" "Get and view an RFC" t nil)
|
||||
;; (autoload 'get-rfc-view-rfc-at-point "get-rfc" "View the RFC at point" t nil)
|
||||
;; (autoload 'get-rfc-grep-rfc-index "get-rfc" "Grep rfc-index.txt" t nil)
|
||||
;; You can then bind these functions to a key.
|
||||
|
||||
|
||||
;;; History:
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
;;;
|
||||
;;; User variables
|
||||
;;;
|
||||
|
||||
(defgroup get-rfc nil
|
||||
"Getting RFCs from within Emacs."
|
||||
:group 'convenience)
|
||||
|
||||
(defcustom get-rfc-rfcs-local-flag t
|
||||
"*Non-nil means RFCs are available locally.
|
||||
|
||||
If this variable is t you will need to set
|
||||
`get-rfc-local-rfc-directory' appropriately."
|
||||
:group 'get-rfc
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom get-rfc-remote-rfc-directory "http://www.ietf.org/rfc/"
|
||||
"*Where to find RFCs on the WWW.
|
||||
|
||||
This *must* end in a trailing slash."
|
||||
:group 'get-rfc
|
||||
:type 'string)
|
||||
|
||||
(defcustom get-rfc-remote-rfc-index
|
||||
"http://www.isi.edu/in-notes/rfc-index.txt"
|
||||
"*Where to find the file \"rfc-index.txt\" which lists all currently
|
||||
available RFCS.
|
||||
|
||||
You probably want to change this to point to a site nearer you."
|
||||
:group 'get-rfc
|
||||
:type 'string)
|
||||
|
||||
(defcustom get-rfc-wget-program "wget"
|
||||
"*The wget program `get-rfc' should use to fetch an RFC from the WWW."
|
||||
:group 'get-rfc
|
||||
:type 'string)
|
||||
|
||||
(defcustom get-rfc-no-wget nil
|
||||
"Set this to non-nil if you don't have a working wget.
|
||||
|
||||
If this variable is non-nil, getting a remote RFC will call your
|
||||
favourite browser (via `browse-url')."
|
||||
:group 'get-rfc
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom get-rfc-wget-output-flag "-O"
|
||||
"*Flag to pass to `get-rfc-wget-program' to output a downloaded file
|
||||
to a specified filename."
|
||||
:group 'get-rfc
|
||||
:type 'string)
|
||||
|
||||
(defcustom get-rfc-local-rfc-directory "/usr/local/rfcs/"
|
||||
"*Directory in which RFCs are available locally.
|
||||
|
||||
This *must* end in a trailing slash."
|
||||
:group 'get-rfc
|
||||
:type 'string)
|
||||
|
||||
(defcustom get-rfc-view-rfc-mode nil
|
||||
"*Mode for viewing RFCs.
|
||||
|
||||
Set this to the name of your favourite mode for viewing RFCs."
|
||||
:group 'get-rfc
|
||||
:type 'symbol)
|
||||
|
||||
(defcustom get-rfc-open-in-new-frame t
|
||||
"*Whether or not get-rfc should open a new frame to view an RFC."
|
||||
:group 'get-rfc
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom get-rfc-save-new-rfcs-locally t
|
||||
"*Whether or not get-rfc should save newly downloaded RFCs.
|
||||
|
||||
Files are saved in `get-rfc-local-rfc-directory' (q.v.)."
|
||||
:group 'get-rfc
|
||||
:type 'boolean)
|
||||
|
||||
;;;
|
||||
;;; Internal variables
|
||||
;;;
|
||||
|
||||
(defvar get-rfc-rfc-index "rfc-index.txt"
|
||||
"*The file name of the index of RFCs.")
|
||||
|
||||
(defvar get-rfc-grep-command "grep"
|
||||
"*The grep command to use.")
|
||||
|
||||
(defvar get-rfc-grep-flags "-n -e"
|
||||
"*Flags to pass to grep.")
|
||||
|
||||
(defconst get-rfc-version
|
||||
"1.14"
|
||||
"get-rfc.el's version number.")
|
||||
|
||||
;;;
|
||||
;;; Internal functions
|
||||
;;;
|
||||
|
||||
(defun get-rfc (rfc &optional fullpath)
|
||||
"Get RFC from `get-rfc-remote-rfc-directory'.
|
||||
|
||||
If FULLPATH is non-nil, then assume that RFC is an absolute location.
|
||||
Return the file it was saved in, so we can do
|
||||
\(find-file (get-rfc \"foo\"))."
|
||||
(let ((rfc-full (concat (if (not fullpath)
|
||||
get-rfc-remote-rfc-directory)
|
||||
rfc))
|
||||
(tmp-file (make-temp-file "get-rfc")))
|
||||
(if get-rfc-no-wget
|
||||
(browse-url rfc-full)
|
||||
(call-process get-rfc-wget-program nil nil nil
|
||||
rfc-full (concat get-rfc-wget-output-flag tmp-file))
|
||||
(when get-rfc-save-new-rfcs-locally
|
||||
(let ((file (concat get-rfc-local-rfc-directory rfc)))
|
||||
(copy-file tmp-file file)
|
||||
(setq tmp-file file)))
|
||||
tmp-file)))
|
||||
|
||||
;;;
|
||||
;;; User functions
|
||||
;;;
|
||||
|
||||
(defun get-rfc-version (&optional arg)
|
||||
"Print Get RFCs version number in the minibuffer.
|
||||
|
||||
If optional ARG is non-nil, insert in current buffer."
|
||||
(interactive "*P")
|
||||
(if arg
|
||||
(insert "\n" get-rfc-version "\n")
|
||||
(message get-rfc-version)))
|
||||
|
||||
;;;###autoload
|
||||
(defun get-rfc-view-rfc (number)
|
||||
"View RFC NUMBER.
|
||||
|
||||
You can specify whether RFCs are available locally by setting
|
||||
`get-rfc-rfcs-local-flag' to t. If you do so you should also set
|
||||
`get-rfc-local-rfc-directory' to point to the relevant directory.
|
||||
You may also specify where on the web to find RFCs by setting
|
||||
`get-rfc-remote-rfc-directory' appropriately."
|
||||
(interactive "sWhich RFC number: ")
|
||||
(let* ((rfc (concat "rfc"number".txt"))
|
||||
(rfc-abs (concat (if get-rfc-rfcs-local-flag
|
||||
get-rfc-local-rfc-directory
|
||||
get-rfc-remote-rfc-directory)
|
||||
rfc))
|
||||
(find-file-command (if get-rfc-open-in-new-frame
|
||||
'find-file-other-frame
|
||||
'find-file)))
|
||||
(if get-rfc-rfcs-local-flag
|
||||
(if (file-exists-p rfc-abs)
|
||||
(funcall find-file-command rfc-abs)
|
||||
(funcall find-file-command (get-rfc rfc)))
|
||||
(funcall find-file-command (get-rfc rfc))))
|
||||
(if get-rfc-view-rfc-mode
|
||||
(funcall get-rfc-view-rfc-mode)))
|
||||
|
||||
;;;###autoload
|
||||
(defun get-rfc-view-rfc-at-point ()
|
||||
"View the RFC whose number is at point."
|
||||
(interactive)
|
||||
(condition-case err ; in case there is no word at point
|
||||
(let ((rfc (thing-at-point 'word)))
|
||||
(and (string-match "[^0-9]+" rfc)
|
||||
(setq rfc (replace-match "" nil t rfc)))
|
||||
(if (string= "" rfc)
|
||||
(message "There's no RFC here!")
|
||||
(get-rfc-view-rfc rfc)))
|
||||
(wrong-type-argument
|
||||
(message "There's no RFC here!"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun get-rfc-grep-rfc-index (string)
|
||||
"Grep for STRING in rfc-index.txt."
|
||||
(interactive "sSearch for: ")
|
||||
(let ((grep-args (concat get-rfc-grep-command
|
||||
" -i " get-rfc-grep-flags " \""
|
||||
string "\" "
|
||||
(if get-rfc-rfcs-local-flag
|
||||
(concat get-rfc-local-rfc-directory
|
||||
get-rfc-rfc-index)
|
||||
(get-rfc
|
||||
get-rfc-remote-rfc-directory t)))))
|
||||
(grep grep-args)))
|
||||
|
||||
(provide 'get-rfc)
|
||||
|
||||
;;; get-rfc.el ends here
|
|
@ -1,12 +0,0 @@
|
|||
* HTTP REST CLIENT
|
||||
*** #+BEGIN_SRC and #+END_SRC tags need to be present
|
||||
*** fold/unfold with tab
|
||||
|
||||
** #Example GET Request
|
||||
#+BEGIN_SRC restclient :results replace
|
||||
GET https://www.google.com
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC restclient :results replace
|
||||
GET https://ipinfo.io
|
||||
#+END_SRC
|
21
install.sh
21
install.sh
|
@ -2,40 +2,19 @@
|
|||
# inspiration from https://github.com/webpro/dotfiles/blob/master/install.sh
|
||||
# inspiration from https://medium.com/@webprolific/getting-started-with-dotfiles-43c3602fd789#.jfhvg130r
|
||||
|
||||
# PS1 COLOR
|
||||
GREEN="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]:"
|
||||
RED=""\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]:"
|
||||
|
||||
# get current dir so script can run from anywhere
|
||||
export DOTFILES_DIR
|
||||
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
|
||||
# update dot files by pulling latest repo
|
||||
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master
|
||||
|
||||
# run checks for color
|
||||
if [[ $1 = "color=green" ]]; then
|
||||
echo "export PS1=$GREEN" >> "$DOTFILES_DIR/.envars"
|
||||
fi
|
||||
|
||||
if [ $1 = "color=red" ]; then
|
||||
echo "export PS1=$RED" >> "$DOTFILES_DIR/.envars"
|
||||
fi
|
||||
|
||||
|
||||
# symlink our dotfiles to our users home dir so they can make use of all the good stuff in it
|
||||
ln -sfv "$DOTFILES_DIR/.bash_profile" ~
|
||||
ln -sfv "$DOTFILES_DIR/.bashrc" ~
|
||||
ln -sfv "$DOTFILES_DIR/.bash_aliases" ~
|
||||
ln -sfv "$DOTFILES_DIR/.bash_functions" ~
|
||||
|
||||
ln -sfv "$DOTFILES_DIR/.envars" ~
|
||||
|
||||
ln -sfv "$DOTFILES_DIR/.vim" ~
|
||||
ln -sfv "$DOTFILES_DIR/.vimrc" ~
|
||||
|
||||
# download and install vundle for vim plugins
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue