Sublime C++ Mac

I’ve written about the importance of scripting in data science. But I’ve realized that I’ve never introduced my favorite script editor. It’s Sublime Text 3! In this article, I’ll show you:

  • What is Sublime Text 3?
  • What are its best features for data scientists?
    Aaaand:
  • How can you use it on a remote server?
  1. Sublime Text can now utilize your GPU on Linux, Mac and Windows when rendering the interface. This results in a fluid UI all the way up to 8K resolutions, all while using less power than before.
  2. Sep 09, 2019 On macOS terminal ctrl+C terminates the program running. In Sublime Text, cmd+B runs a program such as Python, Ruby or such. If I want to terminate a running code, what is the shortcut key in Subl.

Note: After writing and re-reading this article, I’ve realized that I speak very highly of Sublime Text 3… So just in case, let me add here: I praise it because I love it. I’m not affiliated with the Sublime Text team in any way.

The latest version of Sublime Text, 4.0, has several new enhancements to make it even better. One of these is the addition of Sublime Text' improved visual editor. With the introduction of the enhanced visual editor, you can now easily edit large files without having to type in long lines of code. This makes it far easier to create formatted.

What is Sublime Text 3?

Sublime Text 3 is a text editor for coding. It’s like TextEdit (on Mac) or Notepad (on Windows). You can type text in it and you can save that in different file formats. Except that Sublime Text 3 is specialized for coding.

SQL script in TextEdit:

The same SQL script in Sublime Text 3:

The most obvious differences are:

  • Sublime Text colors your code according to the syntax you use
  • It recognizes every major language that you will use as a data scientist: SQL, Python, bash, R, etc.
  • It shows the number of the lines in your script
  • It gives you a script overview on the right side

And that’s just the beginning; there is so much more in Sublime Text 3…

Sublime Text 3 vs. vim, nano, etc.

I have to add:
Sublime is not the one and only text editor for coding.
Many data scientists use vim or nano — or my favorite: mcedit.

These are all good tools for editing scripts and code. You can use them from the command line and mcedit even has a nice, visual, point-and-click type of interface — similar to Sublime Text.

The same SQL script in mcedit:

But while many data scientists love these old-school script editors, in my experience, they are not user-friendly enough. You can get used to them, sure. For instance, I’ve used mcedit for years… But once you try Sublime Text 3, there is no going back. It’s much faster, much smoother and much more efficient than anything else you’ve used before.

Sublime Text 3: a few key features that will make your coding life easier and happier

There are hour-long online courses about how to get the most out of Sublime Text 3. In this article, I’ll list only a few of my favorite features that I use in my data science projects day-to-day — you know, just to whet your appetite. 😉 (And then if you want to go deeper, you can find on Youtube some more in-depth tutorials anyway.)

Syntax highlighting

The most obvious key feature is syntax highlighting. When you type (or copy-paste) your code, Sublime won’t automatically recognize which language you use. E.g. here I’ve copy-pasted the SQL script I showed you before.

But you can turn this into a beautifully coloured SQL script by either selecting your preferred language manually:

Or by simply saving the script with the right file extension. (In this example, in an .sql format.)

And boom:

Multi-cursor and multi-edit

Even in the most cleverly written data science script, sometimes you have to be repetitive. But typing the same keyword over and over again or copy-pasting all the time is boring and slow.

One of the coolest features in Sublime Text 3 is multi-cursor. By holding the CMD key on Mac — or the CTRL key on Windows/Linux — you can place multiple cursors on your screen. And when you start to type some text, it magically shows up at every cursor.

Like this:

Multi-select + multi-cursor + multi-edit

Multi-cursor can be used to change the pre-existing parts of your script, too!
Let’s say that in your SQL script, you want to change the user_id keyword to email_address. (“Ah, typical, the data infrastructure team changed the column names in our SQL database, again! Now I’ll have to go and fix all my scripts…”)

Not a problem!

First off, there is the usual find-and-replace-all feature, in Sublime Text, too.
Just hit: CMD + ALT + F (Mac) or CTRL + H (Windows/Linux)

And you can find and replace…

But there is an even more visual (and flexible) solution to get the same thing done.

1. Select one occurrence of the text/pattern you want to change. All other occurrences will be highlighted automatically:

2. Now, hit CTRL + CMD + G on a Mac — or ALT + F3 on Windows/Linux. And with that, all keyword instances will be not just highlighted but selected for editing, too. So you’ll see a cursor after each selection.

3. And at this point, whatever you type in will edit every selected keyword:

Pretty cool, huh?

Note: Find all the selection and multi-cursor hotkeys in this Github repo and in the original Sublime Text tutorial.

Auto-complete

Another lovely feature is auto-completion.

Note: You have this in many other data science tools, for instance Jupyter Notebook or in Terminal, too.

When you start to type a keyword, it automatically shows the keywords that you used that start with the same characters. E.g.:

Just hit the TAB key and it will automatically extend to it, so you can spare some characters and time. This can be especially handy for Python scripts when you work with many, many variables.

Customization

Sublime Text 3 is 100% customizable, too. You can set your preferred character size, color scheme, drag speed, etc. You can turn on and off auto-indentations, smart-indentations, auto-completion… basically, you can customize everything.

It’s very flexible — but on the flipside, the customization works via a JSON-like editor. So to fine-tune your environment settings, you have to code. E.g. this is how I set the default font size in my Sublime Text editor to 16 pixels.

Anyways. It might look complicated but if you try it out, you’ll get used to it quickly… and I love the flexibility it provides.

Sublime C++ Mac

Okay, these were my favorite five key features of Sublime Text that make my coding tasks so much easier and smoother. (Again: if you want to see more, go to Youtube, there are tons of cool tutorials on this topic.)

Using Sublime Text 3 on a remote server

One of the top questions I get from my course participants is: how they can use Sublime Text 3 on a remote server.

It might look impossible at first sight. It’s a desktop application, right? But don’t worry, it’s definitely possible — thanks to randy3k (and many others) who created an awesome open-source solution for this.

In the original Github repository there is a brief description of how to set things up. But I’ve seen that for more beginner data scientists, it’s not 100% clear how to go through it. So in the rest of this article, I’ll give you a bit more in-depth, step-by-step process for how to set things up — so you can use Sublime Text3 on your remote server, too.

Note: I’ll assume that you use the very same server setup that I use in all Data36 tutorials and video courses. If you don’t, go through this remote server for data science tutorial first.

RemoteSubl – the concept of using Sublime on a remote server

We will use the RemoteSubl package to connect our Sublime Text 3 editor to our remote data server. The concept is simple:

  1. You’ll open a regular ssh connection to your remote server
  2. You’ll use that connection — and a specific port — to send scripts back and forth between your remote server and local Sublime Text 3.
  3. You’ll edit your scripts in Sublime Text 3 on your computer.
  4. When you save the script in Sublime, it will send the updated version back to your remote server.

I know, it sounds complicated. So here’s a more visual explanation of the concept.

This is called tunnelling, by the way.
And by the end of this tutorial, when you set up everything properly, these four steps will happen seamlessly and automatically anyway.

The setup process

To set things up, you will need to install a few things to your remote server and to your computer, as well.

I assume here that you already have these:

  1. A remote data server with Python, SQL and bash.
  2. And Sublime Text 3 on your computer.

If you don’t, get these first.

Next, we will go through the instructions of the RemoteSubl github repository. And, as promised, I’ll dig a little deeper into a few parts. Here are the steps:

  1. Installing Package Control to Sublime Text 3. (On your local computer.)
  2. Installing the RemoteSubl package. (On your local computer.)
  3. Installing RemoteSubl to your remote server.
  4. Editing your first script with Sublime Text3 on your remote server.

STEP #1: Installing Package Control to Sublime Text 3

There are tons of extensions and additions for Sublime Text 3. These don’t come with the original setup of the program but you can easily add them later by using the Package Control feature.

If you have never used it before, you’ll have to install Package Control first.

For that, go to Top Menu >> Tools >> Command Palette!

A search bar will pop right up!

Start to type “package“…

And choose Install Package Control!

You’ll get a quick notification that it has been installed.

Great! Now you can add new packages to Sublime.

STEP #2: Installing the RemoteSubl package

Go back to:

Top Menu >> Tools >> Command Palette

And now start to type “install“.

Choose: Package Control: Install Package!

Here, lots and lots of available Sublime packages and extensions will be listed.

Type: RemoteSubl. Then click and install it!

You’ll see only a tiny success message in the bottom left corner… and only for a few seconds.

But if you don’t get any error messages that’s good: you have installed RemoteSubl to your Sublime Text 3.

Note: If you want to, you can even double-check whether your RemoteSubl package is indeed successfully installed. Go back to Top Menu >> Tools >> Command Palette, then type “RemoteSubl”… If you see this “Preferences: RemoteSubl Settings”, the installation was successful! (You don’t have to click it.)

STEP #3: Installing RemoteSubl to your remote server

Okay, everything is set on your local computer. Now, install RemoteSubl to your remote server, too.

For that, log in to your server — depending on your operating system:

  • Use Terminal/iTerm2 and the ssh command (if you are on a Mac)!
    or
  • Use Putty (if you are on Windows)!

Note 1: Use your normal user and not the root user. E.g. I can log in with my user called dataguy — using the ssh dataguy@142.93.173.88 command on my Mac.

Note 2: If you have no idea how to login to your data server, you might want to go through this article again.

Once you are logged in to your server, run these 3 commands one by one:

(Note: the first two lines is actually only one line of code! Only your browser breaks it into 2 lines! See the screenshot below.)

Mac sublime c++ 配置

Note: This is somewhat different from what you’ll see in the instructions of the RemoteSubl github repository. Why? Some of my students ran into permission issues — so I figured that I’d give you a more “bulletproof” solution here. 🙂 That’s why all the sudo commands at the beginning of the lines. Plus, in my version, you will be able to call Sublime Text from the command line with the sublime command and not with the rsubl command. The sublime keyword is easier to remember, right? 😉

Okay, all set, it’s time to try out your new remote server script editor!

STEP #4: Editing your first script with Sublime Text3 on your remote server.

Okeydoke!
You’ll have to log out from your data server — and then log back in by adding some special parameters.

This will be different for Mac/Ubuntu users and for Windows users.

If you are on a Mac or Ubuntu…

When you log back into your server, add an extra option to your ssh command.

Instead of the usual…

…use…

E.g. for me, it will be:

This extra -R 52698:localhost:52698 option opened a tunnel using the 52698 port. This tunnel will be used for transferring files between your server and Sublime Text 3.

If you are using Windows…

… open Putty and type your connection details, as usual.
But before you actually connect to your remote server, on the sidebar, go to the Connection >> SSH >> Tunnels menu. And here:

  • Type 52698 to the Source port field!
  • Type localhost:52698 to the Destination field!
  • In the next line, set Local to Remote.
  • And leave the next line on Auto.
  • And eventually, click Add.

Here’s a more visual guide:

After clicking the Add button, you should see this:

If yes, go back to the Session menu on the side bar, Save your configuration and Open the connection.

This additional setting opened a tunnel using the 52698 port. This tunnel will be used for transferring files between your server and Sublime Text 3.

For all Mac/Linux/Windows users…

Once you are logged in to your server, you can try out your freshly installed sublime command. Important: Make sure that the Sublime Text 3 application is running on your local computer!

Just type:

And magic happens, Sublime Text 3 on your computer opens the test.csv file from your remote server:

I type in: 'Hello, this is a test!' — and then save my file.

And then I go back to my Terminal and cat test.csv. And this is what I get:

Ta-da, from now on, you can use Sublime Text 3 on your remote server!

And of course the same way, you can easily edit not just .csv files but .py, .sql and .sh scripts, too.

Disclaimers

When using Sublime Text 3 via the RemoteSubl package on your remote server, watch out for two important things:

1. In order to open anything with the sublime command from the command line, the Sublime Text 3 application has to be opened on your local computer. Otherwise, you’ll get this error message: connect_to localhost port 52698: failed.

2. This method works only as long as the connection (the “tunnel”) between your server and local computer is open. If you close the connection and you didn’t save your script, Sublime Text 3 will return an error message and your script can’t be saved any more.

Conclusion

Sublime Text 3 is an awesome script editor! Give it a try — and I promise, you won’t regret it. Now you know how to use it with a remote server, too, so you can take advantage of it in every kind of data project.

  • If you want to learn more about how to become a data scientist, take my 50-minute video course: How to Become a Data Scientist. (It’s free!)
  • Also check out my 6-week online course: The Junior Data Scientist’s First Month video course.

Cheers,
Tomi Mester

Important links, resources:

New instructions: https://chromium.googlesource.com/chromium/src/+/master/docs/sublime_ide.md

Contents

  1. 9 Example plugin


What is Sublime Text?

It's a fast, powerful and easily extensible code editor. Check out some of the demos on the site for a quick visual demonstration.
  • Project support.
  • Theme support.
  • Works on Mac, Windows and Linux.
  • No need to close and re-open during a gclient sync.
  • Supports many of the great editing features found in popular IDE's like Visual Studio, Eclipse and SlickEdit.
  • Doesn't go to lunch while you're typing.
  • The UI and keyboard shortcuts are pretty standard (e.g. saving a file is still Ctrl+S on Windows).
  • It's inexpensive and you can evaluate it (fully functional) for free.

Installing Sublime Text 2

Download and install from here: http://www.sublimetext.com/
Help and general documentation is available here: http://www.sublimetext.com/docs/2/
Assuming you have access to the right repositories, you can also install Sublime via apt-get on Linux.

Preferences

Sublime configuration is done via JSON files. So the UI for configuring the text editor is simply a text editor. Same goes for project files, key bindings etc.

More Images For Sublime C Mac »

C++
To modify the default preferences, go to the Preferences menu and select Settings-Default. Note that if you would rather like to make these settings user specific, select Settings - User as this applies there as well. The difference is that the default settings file already contains many settings that you might want to modify.
Here are some settings that you might want to change (look these variables up in the settings file and modify their value, you should not have to add them):
'tab_size': 2,
'ensure_newline_at_eof_on_save': true,
The settings take effect as soon as you save the file.
If you've got a big monitor and are used to viewing more than one source file at a time, you can use the View->Layout feature to split the view up into columns and/or rows and look at multiple files at the same time. There's also the Shift+F11, distraction free view that allows you to see nothing but code! ?8-D Sublime also supports dragging tabs out into new windows as Chrome supports, so that might be useful as well.
One thing to be aware of when editing these JSON files is that Sublime's JSON parser is slightly stricter than what you might be used to from editing e.g. GYP files. In particular Sublime does not like it if you end a collection with a comma. This is legal: {'foo', 'bar'} but not this: {'foo', 'bar', }. You have been warned.

Project files

Like configuration files, project files are just user editable JSON files.
Here's a very simple project file that was created for WebRTC and should be saved in the parent folder of the trunk folder (name it webrtc.sublime-project). It's as bare bones as it gets, so when you open this project file, you'll probably see all sorts of files that you aren't interested in.
'folders':
{
}
}

Here is a slightly more advanced example that has exclusions to reduce clutter. This one was made for Chrome on a Windows machine and has some Visual Studio specific excludes. Save this file in the same directory as your .gclient file and use the .sublime-project extension (e.g. chrome.sublime-project) and then open it up in Sublime.
'folders':
{
'name': 'src',
'*.vcproj',
'*.sln',
'*.gitmodules',
],
'build',
'third_party',
'Debug',
]
]

Navigating the project

Here are some basic ways to get you started browsing the source code.
  • 'Goto Anything' or Ctrl+P is how you can quickly open a file or go to a definition of a type such as a class. Just press Ctrl+P and start typing.
  • Open source/header file: If you're in a header file, press Alt+O to open up the corresponding source file and vice versa. For more similar features check out the Goto->Switch File submenu.
  • 'Go to definition': Right click a symbol and select 'Navigate to Definition'. A more powerful way to navigate symbols is by using the Ctags extension and use the Ctrl+T,Ctrl+T shortcut. See the section about source code indexing below.

Enable source code indexing

For a fast way to look up symbols, we recommend installing the CTags plugin. we also recommend installing Sublime's Package Control package manager, so let's start with that.
  • Install the Sublime Package Control package: https://packagecontrol.io/installation
  • Install Exuberant Ctags and make sure that ctags is in your path: http://ctags.sourceforge.net/
    • On linux you should be able to just do: sudo apt-get install ctags
  • Install the Ctags plugin: Ctrl+Shift+P and type 'Package Control: Install Package'
Once installed, you'll get an entry in the context menu when you right click the top level folder(s) in your project that allow you to build the Ctags database. If you're working in a Chrome project however, do not do that at this point, since it will index much more than you actually want. Instead, do one of:
  1. Create a batch file (e.g. ctags_builder.bat) that you can run either manually or automatically after you do a gclient sync:
    ctags --languages=C++ --exclude=third_party --exclude=.git --exclude=build --exclude=out -R -f .tmp_tags & ctags --languages=C++ -a -R -f .tmp_tags third_partyplatformsdk_win8 & ctags --languages=C++ -a -R -f .tmp_tags third_partyWebKit & move /Y .tmp_tags .tags
    This takes a couple of minutes to run, but you can work while it is indexing.
  2. Edit the CTags.sublime-settings file for the ctags plugin so that it runs ctags with the above parameters. Note: the above is a batch file - don't simply copy all of it verbatim and paste it into the CTags settings file :-)
Once installed, you can quickly look up symbols with Ctrl+t, Ctrl+t etc. More information here: https://github.com/SublimeText/CTags
One more hint - Edit your .gitignore file (under %USERPROFILE% or ~/) so that git ignores the .tags file. You don't want to commit it. :)
If you don't have a .gitignore in your profile directory, you can tell git about it with this command:
Windows: git config --global core.excludesfile %USERPROFILE%.gitignore
Mac, Linux: git config --global core.excludesfile ~/.gitignore

Building with ninja

Assuming that you've got ninja properly configured and that you already have a project file as described above, here's how to build Chrome using ninja from within Sublime. For any other target, just replace the target name.
Go to Tools->Build System->New build system and save this as a new build system:
'cmd': ['ninja', '-C', 'outDebug', 'chrome.exe'],
'file_regex': '^[./]*([a-z]?:?[w./]+)[(:]([0-9]+)[):,]([0-9]+)?[:)]?(.*)$'

file_regex explained for easier tweaking in future:
Aims to capture the following error formats while respecting Sublime's perl-like group matching:
1. d:srcchromesrcbasethreadingsequenced_worker_pool.cc(670): error C2653: 'Foo': is not a class or namespace name
2. ../../base/threading/sequenced_worker_pool.cc:670:26: error: use of undeclared identifier 'Foo'
3. ../../base/process/memory_win.cc(18,26): error: use of undeclared identifier 'Foo'
4. ../..src/heap/item-parallel-job.h(145,31): error: expected ';' in 'for' statement specifier
'file_regex': '^[./]*([a-z]?:?[w.-/]+)[(:]([0-9]+)[):,]([0-9]+)?[:)]?(.*)$'

(0) Cut relative paths (which typically are relative to the out dir and targeting src/ which is already the 'working_dir')
(2) Match the rest of the file
(3) File name is followed by open bracket or colon before line number
(5) Line # is either followed by close bracket (no column group) or comma/colon
(7) If (6) is non-empty there will be a closed bracket or another colon (but can't put it inside brackets as the 'column filename group' only wants digits).
(8) Everything else until EOL is the error message.

On Linux and Mac, fix the targets up appropriately, fwd slash instead of backslash, no .exe, etc
Linux example:
// Pass -j1024 if (and only if!) building with GOMA.
'cmd': ['ninja', '-C', 'out/Debug', 'blink', '-j1024'],
// Ninja/GN build errors are build-dir relative, however file_regexp
// is expected to produce project-relative paths, ignore the leading
// ../../(file_path):(line_number):(column):(error_message)
'file_regex': '^../../([^:n]*):([0-9]+):?([0-9]+)?:? (.*)$'

or to avoid making ninja in the path or environment variables:
{
'cmd': ['/usr/local/google/home/MYUSERNAME/git/depot_tools/ninja', '-j', '150', '-C', '.', 'chrome', 'content_shell', 'blink_tests'],
'working_dir': '${project_path}/src/out/Release',
'file_regex': '([^:n]*):([0-9]+):?([0-9]+)?:? (.*)$',
[
'cmd': ['/usr/local/google/home/MYUSERNAME/git/depot_tools/ninja', '-j', '150', '-C', '.', 'chrome', 'content_shell', 'blink_tests'],
'working_dir': '${project_path}/src/out/Debug',
'file_regex': '([^:n]*):([0-9]+):?([0-9]+)?:? (.*)$'
]


Further build system documentation or older documentation (as of Nov 2014 older is more complete).
This will make hitting Ctrl-B build chrome.exe (really quickly, thanks to ninja), F4 will navigate to the next build error, etc. If you're using Goma, you can play with something like: 'cmd': ['ninja', '-j', '200', '-C', 'outDebug', 'chrome.exe'],.

You can also add build variants so that you can also have quick access to building other targets like unit_tests or browser_tests. You build description file could look like this:

And keep using 'ctrl+b' for a regular, 'chrome.exe' build. Enjoy!

Example plugin

Cached

Sublime has a Python console window and supports Python plugins. So if there's something you feel is missing, you can simply add it.
Here's an example plugin (Tools->New Plugin) that runs cpplint (assuming depot_tools is in the path) for the current file and prints the output to Sublime's console window (Ctrl+`):
import subprocess
class RunLintCommand(sublime_plugin.TextCommand):
command = ['cpplint.bat', self.view.file_name()]
stdout=subprocess.PIPE,
print process.communicate()[1]

Sublime Text C++ Compiler Mac

Or, in Sublime Text 3:

Sublime C++ Mac
import subprocess
class RunLintCommand(sublime_plugin.TextCommand):
print('AMI: %s' % self.view.file_name())
command = ['/home/fischman/src/depot_tools/cpplint.py', self.view.file_name()]
process = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if error:
Save this file as run_lint.py (Sublime will suggest the right location when you save the plugin - PackagesUser).


Note that here's an interesting thing in how Sublime works. CamelCaps are converted to lower_case_with_undescore format. Note also that although the documentation currently has information about 'runCommand' member method for the view object, this too is now subject to that convention.
Taking this a step further, you can create a keybinding for your new plugin. Here's an example for how you could add a binding to your User key bindings (Preferences->Key Bindings - User):
{
}
Now, when you hit Ctrl+Shift+L, cpplint will be run for the currently active view. Here's an example output from the console window:
Sublime C++ Mac
D:srccgitsrccontentbrowserbrowsing_instance.cc:69: Add #include <string> for string [build/include_what_you_use] [4]
Done processing D:srccgitsrccontentbrowserbrowsing_instance.cc

As a side note, if you run into problems with the documentation as I did above, it's useful to just use Python's ability to dump all properties of an object with the dir() function:
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__len__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'add_regions', 'begin_edit', 'buffer_id', 'classify', 'command_history', 'em_width', 'encoding', 'end_edit', 'erase', 'erase_regions', 'erase_status', 'extract_completions', 'extract_scope', ... <snip>

Compile current file using Ninja

As a more complex plug in example, look at the attached python file: compile_current_file.py. This plugin will compile the current file with Ninja, so will start by making sure that all this file's project depends on has been built before, and then build only that file.

First, it confirms that the file is indeed part of the current project (by making sure it's under the <project_root> folder, which is taken from the self.view.window().folders() array, the first one seems to always be the project folder when one is loaded). Then it looks for the file in all the .ninja build files under the <project_root>out<target_build>, where <target_build> must be specified as an argument to the compile_current_file command. Using the proper target for this file compilation, it starts Ninja from a background thread and send the results to the output.exec panel (the same one used by the build system of Sublime Text 2). So you can use key bindings like these two, to build the current file in either Debug or Release mode:

{ 'keys': ['ctrl+f7'], 'command': 'compile_current_file', 'args': {'target_build': 'Debug'} },
{ 'keys': ['ctrl+shift+f7'], 'command': 'compile_current_file', 'args': {'target_build': 'Release'} },

If you are having trouble with this plugin, you can set the python logging level to DEBUG in the console and see some debug output.

Format selection (or area around cursor) using clang-format

Copy buildtools/clang_format/scripts/clang-format-sublime.py to ~/.config/sublime-text-3/Packages/User/ (or -2 if still on ST2) and add something like this to Preferences->Key Bindings - User:
'keys': ['ctrl+shift+c'], 'command': 'clang_format',

Miscellaneous tips

  • To synchronize the project sidebar with the currently open file, right click in the text editor and select 'Reveal in Side Bar'. Alternatively you can install the SyncedSideBar sublime package (via the Package Manager) to have this happen automatically like in Eclipse.
  • If you're used to hitting a key combination to trigger a build (e.g. Ctrl+Shift+B in Visual Studio) and would like to continue to do so, add this to your Preferences->Key Bindings - User file:
    • { 'keys': ['ctrl+shift+b'], 'command': 'show_panel', 'args': {'panel': 'output.exec'} }
  • Install the Open-Include plugin (Ctrl+Shift+P, type:'Install Package', type:'Open Include'). Then just put your cursor inside an #include path, hit Alt+D and voila, you're there.
    • If you want to take that a step further, add an entry to the right-click context menu by creating a text file named 'context.sublime-menu' under '%APPDATA%Sublime Text 2PackagesUser' with the following content:
      [ { 'command': 'open_include', 'caption': 'Open Include' } ]
Assuming you've installed Package Control already (https://packagecontrol.io/installation) you can easily install more packages via:
  1. Open Command Palette (Ctrl-Shift-P)
  2. Type 'Package Control: Install Package' (note: given ST's string match is amazing you can just type something like 'instp' and it will find it :-)).
  • Case Conversion (automatically swap casing of selected text -- works marvel with multi-select -- go from a kConstantNames to ENUM_NAMES in seconds)
  • CTags (see detailed setup info above).
  • Git
  • Open-Include
  • Text Pastry (insert incremental number sequences with multi-select, etc.)
  • Wrap Plus (auto-wrap a comment block to 80 columns with Alt-Q)