Sublime Forum

New, and........ uh... help? :)

#1

Okay. My adventures with ST.

First of all I should say I love the program’s polish and obvious scope and quality. Gorgeous! But even with years of experience and RTFM-ing, I’m just hitting roadblocks right now, and I wonder how long to get ST into a state I can actually use it productively. Some help would be really good here :smile: so I can get on with seeing how ST works for me :smile: Right now the four biggest problems I’m hitting:

  1. Documentation is still a real problem when filling in the gaps, like the website says. I’ve googled the most basic things that I expected had
    to be in the help docs, but web pages often assume knowledge of these kinds of basics. Like package basics. Most pages and posts start with “go to the package manager and download SuperXYZ from Github”, when it’s not clear how to download it, whether or not I need to first manually open, edit and save a change to repos or channels to get package X from site Y, whether to add links for packages to the repos or channels section (doesn’t say what the difference is), and how to identify which link should be added. I could manually download the package the slow way but I’d like to be able to use ST properly. Some heads-up how to use package websites that aren’t in ST or PM by default would really help :smiley:

  2. The various popup panels are awesome! But none seem to have gripper resizers to increase the content they can display, or an obvious way to change the fonts or layouts to anything more dense (compact view?). Some panels can contain scrollboxes of dozens or hundreds of items (thousands for the Package Manager?) which makes them impractical to skim through at any reasonable speed. In some cases packages use panels to display content that’s then unreadable because of default panel layouts (Package Manager includes descriptions that read “This package …sists …t…e…in…que”, and no way to hover or see the remainder). Can I improve this in any way?

  3. The popup panels usually auto-close when focus moves elsewhere. If I need to install two packages, or flick constantly between a popup panel and a document, I have to start again in the panel. Many editors have popup panels able to be set as non-modal and not automatically closing, so one can flick between them and the main editor and close the popup manually later. Is there a way to improve my workflow here?

  4. I tried to get Sidebar Enhancements working for context menu functionality (I have 50+ text files in active use most times, so a horizontal tabbar is never useful and a vertical sidebar of open files with a decent context menu is a must-have). I failed, and found that SE only works with “files in a project”. So I tried to create a “project”, only then it still
    didn’t seem to work, because next it transpired that a project seems to mean files in one branch of a filing system (less any excluded folders), and most of my workload isn’t so neatly defined, they don’t have any file system location connection with each other, they’re effectively “whatever text files I need to open and edit to dig into the issue while working”. Some of them do sometimes form a “project” or a “group” in the limited sense of “these 14 files are all open as part of a single task/problem”, but there’s no predetermination of where in the network or filing system I may need to open files in working on that project. Projects sound useful (plus one project for “random files and stuff being edited”?) which would let me use the context menu too. But I’ve dead ended there as well, the only guides I can find on projects don’t help much either, or show how to define the JSON.

Sorry for my first post to be a bunch of noob detritus. I love the simple and effective approach of ST. I’m happy to manually edit .py files if that’ll work and someone says which ones :mrgreen: But right now I want to be editing, not stuck getting the editor reasonably productive for my work needs. Help much appreciated!!

0 Likes

#2

I also can’t see the “subscribe topic/immediate email notification” clickable that’s always around somewhere in each topic; never had that happen in 15 years of forum use. Hmm.

0 Likes

#3

Quick info:

  • The most complete documentation is at docs.sublimetext.info/en/latest/

  • For packages, most people use Package Control (sublime.wbond.net/docs/usage

  • Sublime is largely fuzzy-finder driven, not optimized for scrolling - for searching packages, I’d highly recommend sublime.wbond.net/search since you get way more than just a title and truncated description

  • Any packages that provide context menus only work with folder than have been opened in Sublime Text - this is due to the way the API for the context menu was designed in Sublime Text. Use the File menu to open a folder, or just drag it into Sublime Text. You don’t need a proper Project for most things - but Sublime Text makes it easy to quickly switch from one project to another if you have them set up.

  • There is no email notification functionality with this forum - Jon has stated he doesn’t want to deal with running a mail server

0 Likes

#4

Thanks - that’s brief but helpful :smile:

I’ve tried the “open folder” trick you suggested, I see what you mean about opening a folder then editing the desired file from it. I haven’t figured even with your hint, how to make this work practically. My typical workload might involve 50 - 100 files open from various folders, and I can get access to quick context menu items if I open each text file in two stages rather than one - open folder, then select file. I end up with a list of 50-100 files, and below that 50-100 folders, but it’s still not helping in a practical sense: I can’t get a context menu type of action on the files I’ve opened without finding their corresponding entries in the folder section first. Ctrl-P isn’t helpful to do that (doesn’t show path, so if I have 5 versions of “error.log” from different devices in use, it’s ambiguous which is which in the popup). Also Ctrl-P requires typing a chunk of the filename to find it, which more than negates any gain from a context menu in the first place.

This seems so basic. Am I missing something?

The other issue it creates is that half of the files I’m working on are temp scratchpads, meaning there’s 20 or so files all listed as “untitled” most of which won’t ever be saved or in any folder in the first place. I’m looking to add context menu activated text processing commands to speed up my work, for example to right click various buffers/files and copy certain filtered text from them all, to the clipboard. The functionality for that is present, but how do I get the context menu in the first place, or for file actions a “r.click -> save as” or “r.click->close” action on these?

Is there a solution or workaround for this? Perhaps there’s a plugin that adds paths to the Ctrl-P popup, or context menus on the untitled files? Could I can define my “project” as the entire universe of all local disks and file shares or something, if it needs all files to be in a project?

Alternatively, are there any signs from those close to the coding side of things, that a context menu API for files (ie the top section of the sidebar, rather than the folder/project section) might be arriving in the near future?

0 Likes

#5

So first off, your folder problem is kinda caused by the way you are using the sidebar. First i would recommend opening 1-2 high-level folders and only ever using the side bar when you dont really know what you are looking for. For everything else use Ctrl+p. It takes some getting used to if you aren’t a keyboard dominant programmer but it really is faster. Probably what you are getting stuck on is lack of understanding of fuzzy search which is basically why you would use ST. Here is and example:

Say you have a bunch of files:(this being a bad case because everything is names so similarly.)
toplevel\somefolder\foo\bar.h
toplevel\somefolder\foo\bar.cpp
toplevel\somefolder\bar\foo.cpp
toplevel\somefolder\bar\foo.h
toplevel\somefolder\bar\bar.h
toplevel\somefolder\bar\bar.cpp

hitting Ctrl+p will bring up a fuzzy search bar. the goal of using the fuzzy search is to type the least amount of characters to achieve your end file. What i would type for the above cases would be:
f\bh or even fbh
fbc
bfh
ffh
ffp

Now i am not saying i memorize the three letter shortcuts for my whole filesystem I would use the fuzzy search to guide me.
It is kinda a feeling you get after a while. The best way i can describe it is to type before you think. just start typing the parts of the path that you know are right just like you would for a sidebar menu selecting folders. if you really dont remember where a file is most of the time you can get away with typing the files name and tabbing a few times. I work in a system with hundreds of thousands of files and fuzzy search gets me where i need to go almost all the time. Here is the important bit, you can drop as many letters as you want as long as the letters you type are still in the right order. The key is to drop as many as you can. instead of typing Somereallylongfilenamewith\somesubfolder.cpp type somesomep.

Now fuzzy search wont work if you dont know what you are looking for. For those cases, which for me is rare cause if i dont know what im looking for why am i changing it, use the side bar and navigate to where you want to go. or hit ctrl+o and use the os navigation.

Now for "Ctrl-P isn’t helpful to do that (doesn’t show path, so if I have 5 versions of “error.log” from different devices in use, it’s ambiguous which is which in the popup). " it does show the path its right under the name of the filename. It also shows the fuzzy letters being used to find the file you are looking for. The path is shown, however, as a it diverges from the current file being displayed.

Now for the monkey in the room. I literally cannot think of a single reason, time to ever, for any reason, have 20 scratch files open at a single time. That is by far the strangest thing another programmer has told me. i might open on scratch file a week.

To be the bad guy here, it sounds like ST isn’t really for you. I like sublime b\c i use the vim mode that it comes with. ST is a great editor for mouse-less programming. It really isn’t as strong for mouse center programming like a full IDE like visual studio. In my opinion mouse-less programming is much faster but it is a skill that is hard to get into.

TL;DR fuzzy search is the second best thing ever invented. and you should practice it if you think its not fast, and if you really need that many scratch files you might want to try as different editor. FYFY: Mutiple cursors paired with Ctrl+D is the best thing ever invented.

0 Likes

#6

Thanks - an interesting comment. My comments interspersed piecemeal while pondering it.

I use the sidebar because the tab bar can’t show large numbers of text files nearly as efficiently as a vertical bar (vertical shows 40-50 tabs on a screen + full \paths and scrolling shows more with ease, horizontal bar shows far fewer, paths usually cropped, and multiline tabbar has a cost of killing vertical space which is at more of a premium on most monitors). I can also remember where a file is in a list in moments, to point and right click, but recollecting “what was the name of the file I saw that had that snippet in it” takes quite a pause, often I don’t know, and it’s disruptive. With unfamiliar filenames (unknown log files and large folders to explore what’s going on in them), random filenames (install, temp and log files named by auto-random-filename OS calls), and scratch/temp files (all named identically), typing is less useful and point/click has the edge. With well known files it’s probably like you say, the other way round.

That’s the majority of the time. The files I’m using are rarely from a structure I know or created, most of the time, they’re “whatever files seem useful”.

[quote=“Roflhouse42”]Say you have a bunch of files:(this being a bad case because everything is names so similarly.)
toplevel\somefolder\foo\bar.h
toplevel\somefolder\foo\bar.cpp

Now fuzzy search wont work if you dont know what you are looking for. For those cases, which for me is rare cause if i dont know what im looking for why am i changing it, use the side bar and navigate to where you want to go. or hit ctrl+o and use the os navigation.[/quote]

I agree, if it’s ones own project and nice defined names. But as you say, it’s often not that way. If they have names like “error.log” or buried in a forest of similar folders and files like \Share\temp\mbb\YYYYMMDD\NNN\ae6b927f004-00.log, few people will remember the filename to type into a filename-based switcher panel isn’t likely to help. Ctrl-O or open in Explorer is fine, but once opened I’d like to be able to do actions like multiselect or file functions on that file, or define my own multifile actions, and not only if it’s in a folder I have also loaded.

I think one difference could be perspective, my work doesn’t usually involve well defined organised files or files I know quite well. The text files I’m looking at might be source html, log files of some issue I’m trying to figure out, a section of FOSS code that I’ve never seen before, and no idea what’s what in it and trying to get a handle what it’s doing because it might solve an issue I have, exported xml that it’s not clear if I need to keep or not, snippets that might fall into place or be worthless (and unknown which for a few hours), and so on. Type of contents are variable, filenames and file system locations also variable, much rough note taking and snipping, to review in an hour or so when I have understood more. With well-defined specific programming projects, text files are far more disciplined and one tends to know the filenames intimately, they are in one or a few clear locations (or SVN/GIT is used). For my workload, the same tools are crucial - folding, syntax highlighting, regex find/replace, hide/show lines, encoding, and the rest, but the assumption that the person editing text files knows filenames, or files should be expected to be in a cogent disciplined structure, falls down.

You’re right on the path being shown, I missed that, thanks.

[quote=“Roflhouse42”]Now for the monkey in the room. I literally cannot think of a single reason, time to ever, for any reason, have 20 scratch files open at a single time. That is by far the strangest thing another programmer has told me. i might open on scratch file a week.
To be the bad guy here, it sounds like ST isn’t really for you. I like sublime b\c i use the vim mode that it comes with. ST is a great editor for mouse-less programming. It really isn’t as strong for mouse center programming like a full IDE like visual studio. In my opinion mouse-less programming is much faster but it is a skill that is hard to get into.
TL;DR fuzzy search is the second best thing ever invented. and you should practice it if you think its not fast, and if you really need that many scratch files you might want to try as different editor. FYFY: Mutiple cursors paired with Ctrl+D is the best thing ever invented.[/quote]

Surely none of your post is a “bad guy” thing. Sane, solid, appropriate comment, and I appreciate the honesty. There are many text editors, many styles; I wouldn’t want to knock any program that works well for some, or expect one program to work for all.

The thing is, I’m not a programmer per se. My text editing is more about tool maintenance: applying general problem-solving skills to areas that aren’t my profession. While I’m a heavy text user and I have coded assembler, CLI php, and a bunch of others ad-hoc, I’m not developing on a project here. My focus is more making my tools work efficiently and adding capabilities I benefit from. Mostly if I code, it’s trying to fix an annoyance or compatibility issue in some software that I use daily, or a bug/issue that’s broken after some update cycle. I take the time out to bugfix/patch it, which is my way to contribute back, the same as any contributor. It helps me, helps others, it’s rewarding and enjoyable.

Two quick examples in front of me now:

I use firefox. There’s some old extensions, no longer maintained, which don’t have current equivalents and don’t work with FF 30+ changes. It’s easier to teach myself enough to update them myself (or develop equivalents) and if I do, I can also better handle other extensions that are nice but will become unmaintained in future. I have no idea how this one’s doing what it does, my text editor workspace has files open from the extension itself, temporary working snippets and info from a few dozen webpages, scratchpads for code tests I’m trying out and might discard in a few hours when I’m done and learned from them, schemas I’ve semi-worked out, todos, and so on. Only the important ones need saving. I have dozens of files open across various folders, many not in a folder, and the folders are off-GUI because of the open files. Using the popup would mean looking at the sidebar to find the source filename I want, and type a bit in (very slow!), while folders are off GUI. As for my own scratch files, it’s a PITA thinking up temp names for my files or remembering the author’s idiosyncratic naming, so I leave them as scratchpads till the end of the session, and use ongoing session backups during the day. It’s a quicker workflow; the snippet is captured temporarily in a temp text file; if I need it later it can be found in its unnamed buffer, and if not needed later, it’s not saved at the end of the session.

Second, and closer to home. Before posting my OP, I looked for half a day at a bunch of source for various ST plugins, to try and understand how they worked, as documentation is light in places and to see if any tricks I noticed might be reusable to make ST work better for me. You can imagine all the “that’s interesting/useful, remember it” which ended up temporarily copy-pasted to review in the afternoon. One eventually needed saving, but I needed a dozen temp scratch files while keeping different aspects of ST package coding techniques separate to reread later. (Motive? If I’m going to switch to ST as my text tool of choice, I want to know how malleable it is, and if I feel okay about throwing together a custom packaged functionality if I ever need some timesaving extra feature).

There may be a dozen ways different people would do these tasks and each would approach these differently. Given a sidebar list, I can easily recollect the position in the list of the one file in 50 and quickly recheck something, but it’s a lot more delayed if I have to think about and try to recollect/look up the actual filename (which scratch notes don’t have anyway). It’s a very small thing to have a context menu on filenames in the list, but I’m realising how much I use it. You don’t miss it till you don’t have it :smile: It would help to multiselect files and create a right click macro or plugin to autoextract the contents I’d like … but it’s tricky if the API covers tabs, folders, projects, menus, toolbar, but not all items in the sidebar. So I wondered if anyone close to ST could comment whether that’ll be likely added any time soon?

0 Likes