一半君的总结纸

听话只听一半君

sublime text 2/3 Tips备忘录

备忘录

  1. 如果想每次ctrl-b 都运行同一个文件,可以先save一个project,然后把存出去的.sublime-project文件改掉,把下面这段贴进去
    "build_systems": [
      {
        "name": "PyProj",
        "cmd": ["python", "-u", "$file"],
        "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
        "selector": "source.python"
      }
    ]
    

    然后把上面的$file改成 我想运行的文件

  2. 习惯了ctrl-d 删除一行,自己加个快捷键
    在菜单 Preferences -> Key Bindings - User 里加上
        {
            "keys": ["ctrl+d"],
            "command": "run_macro_file",
            "args": {
                "file": "res://Packages/Default/Delete Line.sublime-macro"
            }
        }
    
  3. 默认的bookmark toggle快捷键是ctrl+f2,但是没效果,这是因为假如你用的是kde,默认这个快捷键是切换desktop的,在在里把他取消就可以用了
    kwin_hotkey
  4. sublime 3的几个好用的package
    Anaconda: a full featured Python development IDE including autocompletion, code linting, IDE features, autopep8 formating
    VCS Gutter: show diffs from Git, Mercurial, or Subversion in the editor’s gutter.
    Bracket​Highlighter: Bracket and tag highlighter for Sublime Text
  5. 有时候启动的时候会卡死,这时候去下面这里把这个文件删掉就行了(不过临时文件都没了)
    $HOME/.config/sublime-text-3/Local/Session.sublime_session
    
  6. 设置alt+w为切换自动换行的快捷键

    { “keys”: [“ctrl+shift+w”], “command”: “toggle_setting”, “args”: {“setting”: “word_wrap”}}

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: