Not just IOS. Desktop Chrome here and the lines don't line up. Since when is "here is a screenful of mundane information, badly presented" Hacker News material?
If you like wrttn.in check out Write.app. Same deal except with a Sublime Text 2 plugin and a bunch more ways to store and share notes than just the web interface. https://writeapp.me
It would be really nice if there was a way to configure a key command in ST2 to run a specific script depending on the language you're writing.
I don't usually write C unless I'm writing stuff for Arduinos. The Arduino IDE isn't very nice, but they have the magical commands "Control+U" and "Control+Shift+U" that upload code either through the FTDI board or a programmer. If I had that in ST2, I would be in heaven (right now I write in ST2, copy, paste into Arduino IDE, then upload).
You can set a `context` on key bindings to trigger only in specific language scopes or per project by referencing the `settings` key in the sublime-project file. In fact, you can even write a python plugin to create your own contexts that you declare in the sublime-keymap json. Check out G's docs: https://sublime-text-unofficial-documentation.readthedocs.or...
You can select "Use external editor" in Arduino preferences, this will save you the copy and paste. Once done editing in SublimeText you just tab over to the Arduino IDE and "CMD+U" to upload.
Write a plugin for yourself complete with the key bindings you want. ST2 plugins are just Python scripts. Granted you have to know Python but I assume since you're writing C and mesing with Arduino you either already know it or can pick it up with no problem.
While I know they are in python, I have never been able to find any documentation about how to build plugins, and what they can do. Could you point me to such a thing?
Yeah, definitely! Here are the two I used - fair warning, one is a Nettuts article. It's not the best tutorial ever but I had never written any Python before reading it and I was able to pull out the useful bits and apply them to my own plugin.
I took bits about how ST2 plugins are structured from the first article, then looked for 'how to do X n Sublime' in the second and once I got those down it was just a matter of Googling for "how to do Y in Python".
The basic gist of it is that a plugin for Sublime is just a Python script that lives in Sublime's packages directory (~/Library/Application Support/Sublime Text 2/Packages on a Mac). Create a folder named after your plugin, drop the python script in there, and then use Python + the Sublime API methods to interact with the browser.
That's gets the whole line including carriage return when nothing is highlighted. You could also cmd+L (expand selection to line) and then cmd+C if you already had something selected.
Tip (not really ontopic): learn Vim, then use whatever editor or IDE you want with Vim keybindings mode or a Vim-emulating plugin - you'll end up with an universal set of keybindings you will learn once and use everywhere and you will be able to be productive in any editor and any IDE (yeah, there are always limitations, nothing emulates Vim perfectly and this is way I advise you "not to learn too much of real vim", just the most usefull keys, but nowadays there is at leas one good vim mode/plugin for any other serious IDE or editor, including ST2).
it's not about vim's infallibility - I consider vim ugly, weird, too powerful and ad the same time limited and I'm a ST user. I was just referring to the fact that by learning its keys and basic modal principles, you can afford not to learn 70% of the fucked-up keystrokes and menu driven functionality of other otherwise good editors or IDEs. Just learn the 30% that is really unique and useful (GUI stuff, advanced refactoring etc.) and "drive it like it's vim" for other features. This way it becomes like driving cars: 90% of car functionality is the same for all cars so I can jump into any car and drive it - maybe not for best safety and performance, but it works for me.
34 comments
[ 3.1 ms ] story [ 79.8 ms ] threadhttp://www.imgur.com/6PZkdHU.png
For mac: https://gist.github.com/lucasfais/1207002
and Windows: https://gist.github.com/hileon/1311735
https://github.com/CodyHenshaw/Misc_Repo/blob/master/sublime...
I don't usually write C unless I'm writing stuff for Arduinos. The Arduino IDE isn't very nice, but they have the magical commands "Control+U" and "Control+Shift+U" that upload code either through the FTDI board or a programmer. If I had that in ST2, I would be in heaven (right now I write in ST2, copy, paste into Arduino IDE, then upload).
http://net.tutsplus.com/tutorials/python-tutorials/how-to-cr... - If nothing else, this will at least teach you how a Sublime plugin works (like where it lives and how you add it to the editor and such)
After that, the Sublime API will take it from there - http://www.sublimetext.com/docs/2/api_reference.html
I took bits about how ST2 plugins are structured from the first article, then looked for 'how to do X n Sublime' in the second and once I got those down it was just a matter of Googling for "how to do Y in Python".
The basic gist of it is that a plugin for Sublime is just a Python script that lives in Sublime's packages directory (~/Library/Application Support/Sublime Text 2/Packages on a Mac). Create a folder named after your plugin, drop the python script in there, and then use Python + the Sublime API methods to interact with the browser.
This site has a pretty good run down of how they work: http://addyosmani.com/blog/custom-sublime-text-build-systems...
Can someone explain?
That's gets the whole line including carriage return when nothing is highlighted. You could also cmd+L (expand selection to line) and then cmd+C if you already had something selected.
In Windows it's Ctrl+Shift+Up/Down, but I've been unable to find the Mac equivalent.
EDIT: Sorry, I spoke too hastly. Ctrl+Super+Up/Down in case anyone else wonders.