This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
// Working in some additional Vim or Vim-like bindings; using 'g' as <leader> | |
// because it's homerow and unused for most commands: | |
{ "keys": ["g", "t"], "command": "next_view", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "r"], "command": "prev_view", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "n"], "command": "focus_side_bar", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "w"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["g", "m"], "command": "find_under_expand", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "s"], "command": "sftp_browse_server", "context": [{"key": "setting.command_mode"}] }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fasta2dict(fil): | |
""" | |
Read fasta-format file fil, return dict of form scaffold:sequence. | |
Note: Uses only the unique identifier of each sequence, rather than the | |
entire header, for dict keys. | |
""" | |
dic = {} | |
cur_scaf = '' | |
cur_seq = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
class NerdTreeCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.window.run_command("toggle_side_bar") | |
self.window.run_command("focus_side_bar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"args": null, | |
"command": "enter_visual_mode" | |
}, | |
{ | |
"args": | |
{ | |
"action_args": null, | |
"action_command": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tab_ncol { | |
awk 'BEGIN {FS="\t"} ; END{print NF}' $1; | |
} | |
alias tncol='tab_ncol' | |
function comma_ncol { | |
awk 'BEGIN {FS=","} ; END{print NF}' $1; | |
} | |
alias cncol='comma_ncol' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
with open(${1:fil}, 'wb') as ${2:out}: | |
${3:code} | |
]]></content> | |
<tabTrigger>write</tabTrigger> | |
<scope>source.python</scope> | |
<description>WithOpenOut</description> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
""" | |
${1:One-liner} | |
USAGE: | |
python ${2:file} ${3:args...} | |
ARGS: | |
${4:arg, explanation} | |
RETURNS: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
"""${1:One-liner docstring}"""]]></content> | |
<tabTrigger>docs</tabTrigger> | |
<scope>source.python</scope> | |
<description>Short Docstring</description> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
class NerdTreeCloseCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.window.run_command("focus_group", {"group": 0} ) | |
self.window.run_command("toggle_side_bar") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new | |
split-window -h -p 50 -t 0 | |
split-window -v -p 30 -t 1 | |
# pane number display | |
set-window-option -g window-status-current-bg yellow | |
# keybindings | |
set-window-option -g mode-keys vi |
NewerOlder