Skip to content

Instantly share code, notes, and snippets.

@karminski
Last active November 24, 2023 01:16
Show Gist options
  • Save karminski/9088261 to your computer and use it in GitHub Desktop.
Save karminski/9088261 to your computer and use it in GitHub Desktop.
sublime text tips
sublime text tips
=================
@author karminski <[email protected]>
@version 140219:1
# install package control
- offical site
https://packagecontrol.io/installation
- install method
"ctrl+`" shortcut or the "View > Show Console" to open console terminal and paste below.
- sublime text 2
please visit official site
- sublime text 3
please visit official site
- run
"ctrl+shift+p" to open panle and "inpa"(install package) to launch package control.
# base user settings
- configure method
"Preference > Settings - User" and paste below.
{
"color_scheme": "Packages/User/Mac Classic (SL).tmTheme",
"default_line_ending": "unix",
"font_face": "consolas",
"font_size": 8,
"ignored_packages":
[
"Markdown Preview"
],
"line_numbers": true,
"line_padding_bottom": 0,
"line_padding_top": 0,
"overlay_scroll_bars": "enabled",
"show_encoding": true,
"show_line_endings": true,
"tabs_small": true,
"theme": "predawn.sublime-theme",
"translate_tabs_to_spaces": true
}
# base user keybindings
- configure method
"Preference > Key Bindings - User" and paste below.
[
{ "keys": ["ctrl+alt+shift+s"], "command": "sftp_upload_file" },
{ "keys": ["f1"], "command": "dired", "args": { "immediate": true }}
]
# some plugins
- SublimeLinter
install php and set php bin dir to operating system environment vars.
- Trmmer
for trim
- Markdown Preview
preview markdown files in borwser
- FileDiffs
diff file opened
- FileBrowser
browse file in sublime text.
- DocBlockr
for php, just write your function and input "/**" at function head, it will auto finish the function comment.
- HexViewer
view hex.
- LineEndings
define line endings for your files.
- nginx
render nginx config files.
- generic config
render generic config files.
- Origami
Split the window however you like.
- sftp
sent your code to server.
- ConvertToUTF8
convert gbk to utf8
- CoffeeScript
render coffeeScript code.
- GitGutter
Show git changes.
# quick open & locate
- press "ctrl + p" to open panle
input filename your searched, input @+function name to locate function in files, also you can use it both.
# hot keys
- to command mode
"esc" like vim
- multi line action
- select
"ctrl + mouse left click" OR "ctrl + alt + up/down"
- jump
"ctrl + left/right"
- jump with select
just jump + "shift"
- jump to line head
goto command mode and press "shift + ^"
- jump to line end
goto command mode and press "shift + $"
- select
"ctrl + d"
- select same
press again the "select"
- select all same
"alt + F3"
- copy current line
"ctrl + c"
- cut current line
"ctrl + x"
- select current line
"ctrl + l"
- move line
"ctrl + shift + up/down"
- comment
- line
"ctrl + /"
- block
"ctrl + shift +"
- wrapper
- normal
"enter"
- wrapper to next line
"ctrl + enter"
- wrapper now line to next line
"ctrl + shift + enter"
- delete
- delete a word
"ctrl + backspace"
- delete a line
"ctrl + shift + backspace"
- delete tab
"shift + tab"
- text manipulation
- upper case
"ctrl + k + u"
- lower case
"ctrl + k + l"
- split window
"shift + alt + 1/2/3/4/5/6/7/8/9"
# at last
- feels like find some awesome color theme? just
http://colorsublime.com/
- offical document? click
[ST3] http://www.sublimetext.com/docs/3/index.html
[ST2] http://www.sublimetext.com/docs/2/index.html
That's All.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment