Saturday, August 12, 2017

Reflections on Sublime so far - quotes and projects

I switched over to using Sublime from Vim this past year and it's been an absolute joy to use. In fact, I liked it so much I even made a cheatsheet for others to get the most out of this editor. However, there's were still a couple of actions that have been a source of frustration: changing quote types and navigation across multiple projects. In this post I'll discuss what they are, the solution I've adopted to address them, and how I still felt about the solutions after a week of use.

Problem 1: Quotes


Replacing single quotes with double quotes or double quotes with single quotes using multiple selection. If you select both quotes, typing in a single quote will simple quote the double quotes themselves. 

For example:

"hello world" becomes '"'hello world'"' when what I really want is 'hello world'. This isn't a problem if I'm trying to actually quote selections, but very rarely do I (or anyone) want to be quoting the quotation marks. 

Solution

The most promising solution I found to this problem is the ToggleQuotes sublime plugin. I just installed it and it works pretty well. I'm considering adding tests to this and adding support for quotes around multi-line strings. 

Problem 2: Project navigation


When I have sublime opened for > 1 projects, it's difficult to go from one to another. Right now I just use the basic mac application switcher and it works fine for two projects but once I have > 3 applications open it becomes a nightmare.

Solution

Turns out Sublime has a built in projects feature to deal with this issue. I just learned that every window you open is either a named project or anonymous project (if you open sublime in any directory not associated with a project). You can define project specific sublime settings and switch between them quickly using sublimes Project feature. You can also add folders from other projects into the current project.

Update after a week of using ToggleQuotes and sublime projects features

  • The project feature for sublime is absolutely indispensable. I've been able to switch from one project to another seamlessly and this has been a tremendous boost for my workflow. I will also say that I continue to advocate for keeping the project files in the same place - no need to pollute your repos if you don't have to. 
  • Toggle quotes is awesome. Thank you @spadgos.






1 comment:

  1. I was diagnosed as HEPATITIS B carrier in 2013 with fibrosis of the
    liver already present. I started on antiviral medications which
    reduced the viral load initially. After a couple of years the virus
    became resistant. I started on HEPATITIS B Herbal treatment from
    ULTIMATE LIFE CLINIC (www.ultimatelifeclinic.com) in March, 2020. Their
    treatment totally reversed the virus. I did another blood test after
    the 6 months long treatment and tested negative to the virus. Amazing
    treatment! This treatment is a breakthrough for all HBV carriers.

    ReplyDelete