Sublime Forum

I need help using command line on PC

#1

Hello everyone, I’m new to using the command line. My class has suggested GNU nano. GNU nano doesn’t seem very user friendly and the HTML text appears DARK BLUE on a BLACK background so it’s REALLY hard to read. I use Sublime text2 for my text files and REALLY like it. Can anyone tell me (in pretty idiot proof, straight forward english) how to use Sublime at the command line?

To the best of my knowledge (based on reviewing things on Stacks Overflow) Sublime is located under program files.

What’s next?

0 Likes

#2

Sublime isn’t usable in the command line but the subl command can be used to open things up in Sublime assuming you’re not using SSH to a remote.

0 Likes

#3

Okay, thanks for the heads up. Can you recommend an editor that i can use in the command line? So far, I’ve only used Putty… not real impressed.

0 Likes

#4

Just to clarify willy1234x1’s post. You can use sublime from the command line, which simply launches Sublime Text with any file names you might pass in. All you need to do is add the Sublime program directory to the system path, then you can run “sublime_text hello.txt” to open Sublime and edit that file from the command line.

However, since Sublime is a GUI application and not a console (text mode) program, you can’t use it over SSH ie. over a putty session (putty is a terminal emulator and not an editor). You’re left with two options here:

  1. If the Linux/Mac machine you’re connecting to with putty is on your local network, make a windows share on it then just map it to a network drive on your windows machine, or open files with the GUI by navigating with explorer to \machine\sharename. This is a very straightforward approach and how I tend to work on my LAN.
  2. If you must use a console mode editor, you’re left with Vim, Emacs, Nano and a few others. The first two a very powerful but have a steep learning curve. Though I use Vim a lot, I find Sublime much nicer to look at and work with. And for beginners it is much, much easier.

Putty, by the way, is really quite a nice terminal program for Windows, especially when everything’s configured correctly.

:smile:

0 Likes

#5

Textadept comes with an excellent console editor (textadept-curses.exe) with most of the features of the GUI program, including syntax highlighting and code folding:

foicica.com/textadept/
foicica.com/textadept/manual.html
foicica.com/textadept/download

0 Likes