to gedit or not to gedit?
to gedit or not to gedit?
gEdit is my favorite text editor for one reason; it can write/save to a directory while you continue to edit. This is great because if I'm making a few changes to something that's saved on an ftp server the delay isn't noticeable. Instead you see a bar appear which shows that it's saving. However, while this is going on, you can continue to edit while this is happening. I normally save when I change something. After I change something I start looking for the next thing to change. In other editors I have to wait while the text editor writes to the file.
The big problem with gedit is that there's no code folding. There's also no feature that indicates which </div> belongs to which <div... So I have to scroll up and down the page figuring out what ending </div> is enclosing.
Is there a good text editor that can save and chew gum at the same time, but also has code folding?
The big problem with gedit is that there's no code folding. There's also no feature that indicates which </div> belongs to which <div... So I have to scroll up and down the page figuring out what ending </div> is enclosing.
Is there a good text editor that can save and chew gum at the same time, but also has code folding?
SciTE has code folding. I use an older version of it on my Zaurus so not sure what the newest version supports. I do know it has code folding and highlighting and can have tabs for multiple open files. Not sure about the saving features.
There is always emacs, I hear it can even wash your clothes for you.
There is always emacs, I hear it can even wash your clothes for you.
Why doesn't it work?
Re:
Tested it already. It cant save while doing something else at the same time.Xamindar wrote:SciTE has code folding. I use an older version of it on my Zaurus so not sure what the newest version supports. I do know it has code folding and highlighting and can have tabs for multiple open files. Not sure about the saving features.
There is always emacs, I hear it can even wash your clothes for you.
Yes! I use SSH for Nautilus to log-in to the FTP account. I do like vim. This might be the answer to my problem.Jeff250 wrote:Does the server have an ssh server running, or can you install one? If so, then you can just ssh in and use vim/emacs/pico or whatever your preferred terminal text editor is (as long as it's vim ).
In the past, I have connected to the server via $ ftp mysite. That worked pretty well, but I assume there's a proper way to connect to my server using the terminal, that I haven't learned yet.
To ssh in from a terminal:
$ ssh user@my.server.com
Then you'll get a remote shell. You'll be able to use whatever text editors are installed on the remote server to edit text. One potential impediment is if the server is too geographically distant from you, in which case you may notice some lag when typing, but if it's local, or even in a neighboring state, the lag is virtually nonexistent. The advantage here is that, since you'd now be running the text editor on the remote server itself, saving files is a quick, local (relative to the remote shell) write.
$ ssh user@my.server.com
Then you'll get a remote shell. You'll be able to use whatever text editors are installed on the remote server to edit text. One potential impediment is if the server is too geographically distant from you, in which case you may notice some lag when typing, but if it's local, or even in a neighboring state, the lag is virtually nonexistent. The advantage here is that, since you'd now be running the text editor on the remote server itself, saving files is a quick, local (relative to the remote shell) write.
Re:
Such a Windows kid.Isaac wrote: Yes! I use SSH for Nautilus to log-in to the FTP account.
You might not like vi. The commands to do anything in it are completely different than anything else you probably use. You are basically learning a new language to use a text editor. But once you get used to it you will not want to use anything else, at least it was that way for me. Vi has saved me many unintended mistakes.
Vim keeps the current file saved while you edit it so there is no need to constantly save. Also, try ":tabnew".
Why doesn't it work?
Re:
Excellent! Thanks. You mean $ ssh user@ftp.asdf.com ? or just $ ssh user@asdf.com? Nether seem to work, but I think I can figure this out. It looks like it wants to work, but something is stopping it. A cpanel setting is more than likely the problem; I'm very comfortable with breaking stuff there.Jeff250 wrote:To ssh in from a terminal:
$ ssh user@my.server.com
Then you'll get a remote shell. You'll be able to use whatever text editors are installed on the remote server to edit text. One potential impediment is if the server is too geographically distant from you, in which case you may notice some lag when typing, but if it's local, or even in a neighboring state, the lag is virtually nonexistent. The advantage here is that, since you'd now be running the text editor on the remote server itself, saving files is a quick, local (relative to the remote shell) write.
hahah! Yeah I still think in "windows".Xamindar wrote:Such a Windows kid.Isaac wrote: Yes! I use SSH for Nautilus to log-in to the FTP account.
You might not like vi. The commands to do anything in it are completely different than anything else you probably use. You are basically learning a new language to use a text editor. But once you get used to it you will not want to use anything else, at least it was that way for me. Vi has saved me many unintended mistakes.
Vim keeps the current file saved while you edit it so there is no need to constantly save. Also, try ":tabnew".
I have VIM but haven't used it too much. I've used Nano many times, breaking X11 repeatedly. I'm sure exposure to the SSH terminal will give me some good VIM experience.
If it's a shared hosting site, then they sometimes run ssh on some nonstandard port to evade common port scans. For instance, port 2222 is sometimes used as an alternate:
$ ssh -p2222 user@server.com
Although if you have ssh already working in nautilus, then it should just be the same server/port set up in nautilus (or so I would think). Also, sometimes shared hosting plans also require you to submit some sort of identification, like a driver's license, before they enable you to ssh in. I think that this is just so that they have some fallback if you try to do something criminal from their servers, although, if so, this policy doesn't make sense on a number of levels.
$ ssh -p2222 user@server.com
Although if you have ssh already working in nautilus, then it should just be the same server/port set up in nautilus (or so I would think). Also, sometimes shared hosting plans also require you to submit some sort of identification, like a driver's license, before they enable you to ssh in. I think that this is just so that they have some fallback if you try to do something criminal from their servers, although, if so, this policy doesn't make sense on a number of levels.
Re:
yeah, I like that, because writing to the HD is really fast then the ftp client could take its time sending and receiving.Thenior wrote:A possible idea, which isn't quite exactly what you asked for, but anyway...
Use smart FTP and an editor like Notepad++. If you do an Open With in SmartFTP, everytime you make a change (you do have to save the file), it will upload the changes. It's fairly seamless.
I kind of like that idea. But VIM via SSH is really cool, so I'm going to try to make that work for the moment.
On the topic of learning vim, I think the best advice I can think to give is to immediately disable the arrow keys in your .vimrc file:
no <up> <nop>
no <down> <nop>
no <left> <nop>
no <right> <nop>
ino <up> <nop>
ino <down> <nop>
ino <left> <nop>
ino <right> <nop>
Moving back and forth between regular keys and the arrow keys is clumsy and bad for your wrists, although not as much as the mouse. Plus, disabling the arrow keys prevents the other related vice of trying to perform movement in insert mode. Although aside from just h/j/k/l, you'll eventually learn other useful ways of moving around that are usually more efficient than moving 1 spot over in a cardinal direction.
Something I found useful to get used to h/j/k/l was to take my favorite game that I played with the arrow keys (I used Tyrian) and remapped the directions to h/j/k/l. I sucked at first, but in a couple of days, I had it down pat. I think I'm actually better now at the game too, since I don't have to share both up and down between one finger--I have one finger uniquely mapped to one direction.
Also, run vimtutor. And then run it again in a week or two. And so on, until you stop learning.
no <up> <nop>
no <down> <nop>
no <left> <nop>
no <right> <nop>
ino <up> <nop>
ino <down> <nop>
ino <left> <nop>
ino <right> <nop>
Moving back and forth between regular keys and the arrow keys is clumsy and bad for your wrists, although not as much as the mouse. Plus, disabling the arrow keys prevents the other related vice of trying to perform movement in insert mode. Although aside from just h/j/k/l, you'll eventually learn other useful ways of moving around that are usually more efficient than moving 1 spot over in a cardinal direction.
Something I found useful to get used to h/j/k/l was to take my favorite game that I played with the arrow keys (I used Tyrian) and remapped the directions to h/j/k/l. I sucked at first, but in a couple of days, I had it down pat. I think I'm actually better now at the game too, since I don't have to share both up and down between one finger--I have one finger uniquely mapped to one direction.
Also, run vimtutor. And then run it again in a week or two. And so on, until you stop learning.
hehheheh... To gedit or not to gedit... It's a joke! gedit?
I wouldn't personally know of a good program to do this myself, but a friend of mine said SciTE, what Xamindar suggested, is good. Though he's used it very lightly himself.
I wouldn't personally know of a good program to do this myself, but a friend of mine said SciTE, what Xamindar suggested, is good. Though he's used it very lightly himself.
This line is true!
The line above this line, is false.
My in-game name is Freakster as well.
Warning: Use of improper English imminant, it's not my primary language.
The line above this line, is false.
My in-game name is Freakster as well.
Warning: Use of improper English imminant, it's not my primary language.
Mousepad.
When I want something with color and higlights, Notepad++ via WINE.
When I want something with color and higlights, Notepad++ via WINE.
Re:
I haven't messed with npp, but, since the source code is available, I would assume that I can compile it to run in Linux. Because I have vim, I haven't spent any time with npp.Skyalmian wrote:Mousepad.
When I want something with color and higlights, Notepad++ via WINE.
Mousepad looks like gedit, which is good. But I already have gedit.
Thanks for your help though!
I tried it but I didn't like it for some reason. I already forgot why...Freakster wrote:SciTE
@Jeff250
Now when I'm using a word processor, like MS Word, or when I'm posting on the forums, I have to make a conscious effort not to use hjkl. Also, when I'm editing in a Word doc, I can feel part myself wanting to use vim commands. It didn't take much to get used to vim, but the more comfortable I get with it the more unnatural everything else feels. I'm sure my brain is connecting new synapses in different ways because of this.