Home Download Buy Blog Forum Support

New to Sublime Text, already charmed!

New to Sublime Text, already charmed!

Postby Nolan on Fri May 17, 2013 5:27 am

I don't know where to begin thanking you guys for this text editor. I was always trying to make a final decision between Notepad++ and Textpad, which are both good editors, but Sublime Text eclipsed them. The only thing it seems to be lacking about is due to the long time it takes to load large files. I have a plain text database at approximately 700kb and it took about 5secs to load. But I'm not here to talk about shortcomings...

Is there a plugin or package to "set favorite files?" let me explain: we can "save" up to ten files most recently used under file -> Open recent. However, there are a lot of files which I have to access and edit and that cannot be saved on that list. Browsing to them everytime is also, planful, since some of them reside on deep folders (game configurations, for instance).

There could be a "file bookmark", or "favourite files" box/menu, in which we could put links to the most accessed files. This would save a lot of time.

I'm asking here at this forum and not the idea/feature suggestion because I sense someone already had this very same need and asked here first, and being Sublime Text community active as it is, then I think someone already put it together. Is there anypackage?

Thanks!
Nolan
 
Posts: 18
Joined: Fri May 17, 2013 5:20 am

Re: New to Sublime Text, already charmed!

Postby skuroda on Fri May 17, 2013 7:03 am

If you haven't already, try out ST3. There have been some significant performance increases in this version. At the moment, it does require a license to use ST3, but if you really like it I wouldn't think there would be a problem supporting development right? Oh and note that sometimes what takes a while is the syntax coloring, not the loading of the actual file (though I guess they are tightly coupled).

Anyways, onto your question, I personally use/recommend FuzzyFileNav. This would let you book mark folders. If you want files specifically, try FavoriteFiles. There are many others (search for "sublime text favorite files" or "sublime text favorite folders"). These generally use the quick panel to select a file. Hope that helps.
skuroda
 
Posts: 687
Joined: Fri Oct 05, 2012 8:11 am

Re: New to Sublime Text, already charmed!

Postby jbjornson on Fri May 17, 2013 7:59 am

You might also try out FileHistory as well (written by me, maintained by FichteFoll). It keeps a history of the accessed and closed files on a per-project basis. You can access this history with the quick panel.

https://github.com/FichteFoll/sublimetext-filehistory
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: New to Sublime Text, already charmed!

Postby Nolan on Fri May 17, 2013 8:44 pm

Thanks for your answers guys, I didn't even know ST3 was already out, I'm eager to support the development but right now I'm unemployed :(
im trying FavoriteFiles, which appears to be good for the job. The only thing is that are still a few keystrokes away from opening those recurrent files; and since this is a custom command, I don't know how to create a keyboard shortcut for a specific file :( Is there a way to?
Nolan
 
Posts: 18
Joined: Fri May 17, 2013 5:20 am

Re: New to Sublime Text, already charmed!

Postby weslly on Fri May 17, 2013 9:29 pm

Nolan wrote:I don't know how to create a keyboard shortcut for a specific file Is there a way to?


You don't need a plugin to do this.

Open the command palette, search for "Preferences: Key bindings - User", open it and add this code to it:

Code: Select all
{
    { "keys": ["ctrl+alt+0"], "command": "open_file", "args": {"file": "/path/to/your/file.txt"} }
}


You just need to replace the "ctrl+alt+0" with the shortcut you want :)
weslly
 
Posts: 203
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: New to Sublime Text, already charmed!

Postby skuroda on Fri May 17, 2013 9:44 pm

If you only have one file you want to reference, you can do what wessly specified. With FavoriteFiles, you can create a keybinding to the open file quick panel.

Code: Select all
[
    { "keys": ["ctrl+shift+o"], "command": "select_favorite_file" }
]


I got the command through looking at the Default.sublime-commands file.
skuroda
 
Posts: 687
Joined: Fri Oct 05, 2012 8:11 am

Re: New to Sublime Text, already charmed!

Postby Nolan on Sat May 25, 2013 9:12 pm

Sorry for the long time fellows.

@weslly
You don't need a plugin to do this.

Open the command palette, search for "Preferences: Key bindings - User", open it and add this code to it:


Two things: first, I set like this:

Code: Select all
[
   { "keys": ["alt+q"], "command": "close_file" },
   { "keys": ["alt+m"], "command": "run_macro_file", "args": {"file": "Packages/User/ponto-e-vírgula-e-jogo-da-velha.sublime-macro"} },
   { "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"} },
    { "keys": ["ctrl+alt+0"], "command": "open_file", "args": {"file": "E:/Dropbox/file.txt"}
}

]


But the file opened was blank. Looking at the titlebar, I oddly saw this:
C:\Users\Main\AppData\Roaming\Sublime Text 2\Packages\User\E:\Dropbox\Leis em txt\CONSTITUIÇÃO.txt • - Sublime Text 2


...so there's something wrong with the syntax... I tried using \ instead of / in the filepath, but it accused a bad escaping; so I replaced with \\, no luck.

Also, there is another issue, but secondary: with that method I'd have to remember a lot of keyboard shortcuts, while having the "favourite files" can save me from filling my head :)

@Skuroda: that saved me! :)
Nolan
 
Posts: 18
Joined: Fri May 17, 2013 5:20 am

Re: New to Sublime Text, already charmed!

Postby weslly on Sat May 25, 2013 10:02 pm

Try this:

Code: Select all
[
    { "keys": ["ctrl+alt+0"], "command": "open_file", "args": {"file": "/e/dropbox/file.txt"}}
]
weslly
 
Posts: 203
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: New to Sublime Text, already charmed!

Postby Saxi on Thu May 30, 2013 4:36 am

skuroda wrote:If you haven't already, try out ST3. There have been some significant performance increases in this version. At the moment, it does require a license to use ST3, but if you really like it I wouldn't think there would be a problem supporting development right? Oh and note that sometimes what takes a while is the syntax coloring, not the loading of the actual file (though I guess they are tightly coupled).

Anyways, onto your question, I personally use/recommend FuzzyFileNav. This would let you book mark folders. If you want files specifically, try FavoriteFiles. There are many others (search for "sublime text favorite files" or "sublime text favorite folders"). These generally use the quick panel to select a file. Hope that helps.


Thanks! FuzzyFileNav is a great find, I just installed it and was something I really wanted from Sublime.
It really needs some way to navigate quickly without having to open/close sublime or mess with windows.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm

Re: New to Sublime Text, already charmed!

Postby Nolan on Mon Jun 10, 2013 6:08 am

That worked, weslly. Thanks!
Nolan
 
Posts: 18
Joined: Fri May 17, 2013 5:20 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 15 guests