Put your settings and customizations into a Mercurial or Git repo and push it to Bitbucket or GitHub.
Lots of people name that repo dotfiles
.
Googling "dotfiles" can lead you to other people's public repos
that can give you ideas for customizations.
Symlink files from your dotfiles
repo to where they need to be.
Here's some of the stuff in my dotfiles
repo:
ls -a /home/doug/dotfiles/
./ ../ .hg/ openbsd/ osx/ raspi/ ubuntu/ windows/
ls -a /home/doug/dotfiles/ubuntu/niko
./ .bash_aliases .gitconfig .hgrc sublime-projects/ ../ .condarc .hgignore .ssh/ sublime-text-3/
and here's some of that symlinked into place:
ls -al /home/doug/
total 508 drwx------ 38 doug doug 12288 Jan 28 11:07 ./ drwxr-xr-x 4 root root 4096 Oct 8 18:51 ../ -rw-rw-r-- 1 doug doug 24 Oct 30 11:09 .aspell.en.prepl -rw-rw-r-- 1 doug doug 22 Oct 30 11:09 .aspell.en.pws drwxrwxr-x 6 doug doug 4096 Jan 28 11:04 .atom/ lrwxrwxrwx 1 doug doug 34 Oct 10 11:33 .bash_aliases -> dotfiles/ubuntu/niko/.bash_aliases -rw------- 1 doug doug 40636 Jan 26 13:25 .bash_history -rw-r--r-- 1 doug doug 220 Oct 8 18:51 .bash_logout -rw-r--r-- 1 doug doug 3760 Oct 8 18:51 .bashrc drwxrwxr-x 2 doug doug 4096 Oct 10 11:40 bin/ drwx------ 28 doug doug 4096 Jan 28 11:04 .cache/ drwxrwxr-x 2 doug doug 4096 Oct 13 11:32 .conda/ lrwxrwxrwx 1 doug doug 29 Oct 9 19:20 .condarc -> dotfiles/ubuntu/niko/.condarc drwx------ 34 doug doug 4096 Jan 28 11:04 .config/ drwxrwxr-x 2 doug doug 4096 Oct 9 19:19 .continuum/ drwx------ 3 doug doug 4096 Nov 17 10:01 .dbus/ drwxr-xr-x 2 doug doug 4096 Dec 9 09:25 Desktop/ drwxr-xr-x 11 doug doug 4096 Jan 25 11:40 Documents/ drwxrwxr-x 8 doug doug 4096 Jan 25 12:02 dotfiles/ drwxr-xr-x 2 doug doug 4096 Jan 28 10:56 Downloads/ lrwxrwxrwx 1 doug doug 30 Oct 8 18:51 .ecryptfs -> /home/.ecryptfs/doug/.ecryptfs/ -rw-r--r-- 1 doug doug 8980 Oct 8 18:51 examples.desktop drwxrwxr-x 2 doug doug 4096 Oct 8 20:16 .fonts/ drwx------ 3 doug doug 4096 Dec 17 10:19 .gconf/ drwxr-xr-x 24 doug doug 4096 Jan 26 12:58 .gimp-2.8/ lrwxrwxrwx 1 doug doug 31 Oct 9 19:18 .gitconfig -> dotfiles/ubuntu/niko/.gitconfig drwx------ 2 doug doug 4096 Nov 13 05:59 .gnome2/ drwxrwxr-x 2 doug doug 4096 Nov 17 10:02 .gstreamer-0.10/ lrwxrwxrwx 1 doug doug 30 Oct 9 19:13 .hgignore -> dotfiles/ubuntu/niko/.hgignore lrwxrwxrwx 1 doug doug 26 Oct 9 19:13 .hgrc -> dotfiles/ubuntu/niko/.hgrc drwxr-xr-x 2 doug doug 4096 Oct 23 10:01 .hplip/ -rw------- 1 doug doug 5584 Dec 17 10:19 .ICEauthority drwxr-xr-x 5 doug doug 4096 Oct 12 09:07 .ipython/ drwxr-xr-x 2 doug doug 4096 Oct 15 12:10 .jupyter/ drwx------ 3 doug doug 4096 Oct 11 13:02 .kde/ -rw------- 1 doug doug 35 Dec 9 09:16 .lesshst drwx------ 5 doug doug 4096 Oct 9 20:53 .local/ drwxrwxr-x 10 doug doug 4096 Jan 28 11:08 miniconda3/ -rw-rw-r-- 1 doug doug 154 Nov 12 15:57 MiscNumbers.txt -rw-rw-r-- 1 doug doug 41 Nov 12 15:46 MiscNumbers.txt~ drwx------ 4 doug doug 4096 Oct 8 19:19 .mozilla/ drwxr-xr-x 2 doug doug 4096 Oct 8 18:52 Music/ -rw-r--r-- 1 doug doug 230 Oct 8 19:07 .pam_environment -rw-rw-r-- 1 doug doug 3048 Dec 1 12:25 .pgadmin3 -rw-rw-r-- 1 doug doug 551 Nov 29 10:09 pgadmin.log -rw------- 1 doug doug 38 Nov 29 09:31 .pgpass drwxr-xr-x 2 doug doug 4096 Oct 8 18:52 Pictures/ drwx------ 3 doug doug 4096 Jan 28 11:04 .pki/ lrwxrwxrwx 1 doug doug 29 Oct 8 18:51 .Private -> /home/.ecryptfs/doug/.Private/ -rw-r--r-- 1 doug doug 675 Oct 8 18:51 .profile -rw------- 1 doug doug 6 Nov 29 10:00 .psql_history drwxr-xr-x 2 doug doug 4096 Oct 8 18:52 Public/ drwxrwxr-x 1 1557 210 512 Sep 21 14:47 public_html/ -rw-rw-r-- 1 doug doug 2472 Nov 26 14:14 .Rhistory -rw------- 1 doug doug 1024 Nov 23 14:45 .rnd drwxrwxr-x 12 doug doug 4096 Nov 26 14:14 .rstudio-desktop/ drwxrwxr-x 2 doug doug 4096 Dec 14 12:19 skookum/ drwx------ 2 doug doug 4096 Nov 29 10:55 .ssh/ -rw-r--r-- 1 doug doug 0 Oct 8 19:44 .sudo_as_admin_successful drwxr-xr-x 2 doug doug 4096 Oct 8 18:52 Templates/ drwxrwxr-x 3 doug doug 4096 Nov 9 10:29 .tox/ drwxrwxr-x 7 doug doug 4096 Dec 14 12:14 .vagrant.d/ drwxr-xr-x 2 doug doug 4096 Oct 8 18:52 Videos/ drwx------ 3 doug doug 4096 Nov 26 12:35 VirtualBox VMs/ -rw------- 1 doug doug 49 Dec 17 10:19 .Xauthority -rw-rw-r-- 1 doug doug 131 Oct 8 19:07 .xinputrc -rw------- 1 doug doug 1780 Jan 4 11:33 .xsession-errors -rw------- 1 doug doug 2870 Dec 17 10:18 .xsession-errors.old
ls -al /home/doug/.ssh/
total 388 drwx------ 2 doug doug 4096 Nov 29 10:55 ./ drwx------ 38 doug doug 12288 Jan 28 11:07 ../ -rw------- 1 doug doug 951 Oct 9 18:45 1024_id_rsa -rw-r--r-- 1 doug doug 229 Oct 9 18:45 1024_id_rsa.pub -rw-rw-r-- 1 doug doug 398 Oct 9 18:47 authorized_keys lrwxrwxrwx 1 doug doug 43 Oct 10 11:42 config -> /home/doug/dotfiles/ubuntu/niko/.ssh/config -rw------- 1 doug doug 1766 Oct 9 18:45 id_rsa -rw-r--r-- 1 doug doug 398 Oct 9 18:45 id_rsa.pub -rw------- 1 doug doug 13608 Jan 13 14:21 known_hosts -rw-r--r-- 1 doug doug 10062 Nov 6 14:30 known_hosts.old -rw------- 1 doug doug 887 Oct 9 18:45 mazurIP_id_rsa -rw-r--r-- 1 doug doug 229 Oct 9 18:45 mazurIP_id_rsa.pub -rw------- 1 doug doug 1679 Oct 9 18:45 nefos-sshfs_id_rsa -rw-r--r-- 1 doug doug 396 Oct 9 18:45 nefos-sshfs_id_rsa.pub -rw------- 1 doug doug 1675 Oct 9 18:45 old_nefos_id_rsa -rw-r--r-- 1 doug doug 396 Oct 9 18:45 old_nefos_id_rsa.pub -rw------- 1 doug doug 1671 Oct 9 18:45 picasso_backup_id_rsa -rw-r--r-- 1 doug doug 396 Oct 9 18:45 picasso_backup_id_rsa.pub -rw------- 1 doug doug 1675 Oct 9 18:45 rsync_to_eos_id_rsa -rw-r--r-- 1 doug doug 411 Oct 9 18:45 rsync_to_eos_id_rsa.pub -rw------- 1 doug doug 1675 Oct 9 18:45 SalishSeaNEMO-nowcast_id_rsa -rw-r--r-- 1 doug doug 403 Oct 9 18:45 SalishSeaNEMO-nowcast_id_rsa.pub -rw------- 1 doug doug 1675 Oct 30 17:19 sealinkd_app_deploy_id_rsa -rw-r--r-- 1 doug doug 405 Oct 30 17:19 sealinkd_app_deploy_id_rsa.pub -rw------- 1 doug doug 1766 Nov 3 10:06 sealinkd_vm_id_rsa -rw-r--r-- 1 doug doug 414 Nov 3 10:06 sealinkd_vm_id_rsa.pub -rw------- 1 doug doug 1675 Oct 9 18:45 SoG-bloomcast_id_rsa -rw-r--r-- 1 doug doug 395 Oct 9 18:45 SoG-bloomcast_id_rsa.pub -rw------- 1 doug doug 1671 Oct 9 18:45 wallIP_id_rsa -rw-r--r-- 1 doug doug 397 Oct 9 18:45 wallIP_id_rsa.pub -rw------- 1 doug doug 1766 Oct 9 18:45 west.cloud_id_rsa -rw-r--r-- 1 doug doug 392 Oct 9 18:45 west.cloud_id_rsa.pub
Syntax highlighting
Brackets matching
Spell checking
Static analysis (lint-ing) for your common language(s)
Download Sublime Text 3 from : http://www.sublimetext.com/3
Multi-line editing
Ctrl+L
selects linesShift+Ctrl+L
splits the selection in to lines, each with a cursorCtrl+D
selects the next ocurrence of a word or piece of selected text, each with a cursorCtrl+K Ctrl+D
skip selectionCmd
instead of Ctrl
Multi-line editing is available in Jupyter Notebook cells (though perhaps not with the same key bindings).
The editor that Jupyter uses is CodeMirror.
Goto anything
Open files with only a few keystrokes, and instantly jump to symbols, lines or words.
Triggered with Ctrl+P
, it is possible to:
These shortcuts can be combined, so tp@rf may take you to a function read_file
within a file text_parser.py
.
Similarly, tp:100 would take you to line 100 of the same file.
Command Palette
Shift+Ctrl+P
gives keyboard access to all editor commandsJupyter Notebook has a command palette as of v4.1, but no fuzzy matching yet
Fuzzy matching
Projects
Install via the Subliime Text console (see https://packagecontrol.io/installation)
Built-in, use the command palette to go to Settings or Install Packages and Themes
ls /home/doug/.config/sublime-text-3/Installed\ Packages
0_package_control_loader.sublime-package
AdvancedNewFile.sublime-package
Emmet.sublime-package
INI.sublime-package
Mako.sublime-package
Mercurial for Sublime.sublime-package
Package Control.sublime-package
PyV8/
RestructuredText Improved.sublime-package
Restructured Text (RST) Snippets.sublime-package
SublimeLinter-flake8.sublime-package
Theme - SoDaReloaded.sublime-package
Tomorrow Color Schemes.sublime-package
MinimalFortran
At its simplest, just a directory tree:
{
"folders":
[
{
"path": "/home/doug/Documents/WorkJournal"
}
]
}
Can also include:
make
, unit tests, pretty much any command-line toolChange default settings for almost anything:
{
"added_words":
[
"Latornell",
"43ravens",
"Bitbucket",
"Refactored",
"orcinus",
"gauge",
"favour",
"salish",
"skookum",
"bathymetry"
],
"color_scheme": "Packages/User/SublimeLinter/Tomorrow-Night-Blue (SL).tmTheme",
"detect_indentation": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".coverage",
"*.mod",
"*.o",
"*.pyc",
"*.sublime-workspace"
],
"find_selected_text": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"_build",
"dist",
"build",
"__pycache__",
"*.egg-info"
],
"font_face": "Source Code Pro",
"font_options":
[
"subpixel_antialias"
],
"font_size": 8,
"highlight_line": true,
"ignored_packages":
[
"RestructuredText",
"Vintage"
],
"rulers":
[
72,
79
],
"tab_size": 4,
"theme": "SoDaReloaded Dark.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true
}
Applied when you open a file that the editor recogizes the syntax for (Python, Makefile, HTML, YAMLS, etc. etc.) or when you explicitly set the syntax via the command palette.
I mostly use these to control indentation:
{
"tab_size": 2
}
My Makefile
setting is really important to me because I have a default
setting of "translate_tabs_to_spaces": true
but make
demands tabs,
so:
{
"tab_size": 8,
"translate_tabs_to_spaces": false
}
Allow you to enter a simple prefix in the editor and hit tab to expand the prefix into a larger code block with templated values.
Both Sublime and Atom have lots of built-in snippets, but you can also define your own:
XML in Sublime Text:
<snippet>
<content><![CDATA[import ipdb; ipdb.set_trace()]]></content>
<tabTrigger>ipdb</tabTrigger>
<scope>source.python</scope>
<description>Start ipdb tracing</description>
</snippet>
CoffeScript in Atom:
'.source.coffee':
'Console log':
'prefix': 'log'
'body': 'console.log $1'