开发者

notepad++ alternative on centos to code directly on vps that is like nano

This question has been asked few times here and there, but you see all 开发者_Python百科of them seem to have a linux desktop, i don't want a notepad++ alternative for a linux desktop, I want a notepad++ alternative for centos server, and I want it to be like nano not like vi, I don't know vi, so i'm looking for an editor that let me open a file on vps, choose a programming language, and it should correct my coding mistakes, this way I would not waste my time uploading files from windows to the vps, it should be easy to use and small, I don't want to waste my vps resources on an editor

Does such an editor exist?

Edit

@romainl

my vps is from 2host.com, I have centos 5 64 bit VPS E-CLASS, go to there for more info, that's all the info I know.

It's my production vps true, but i asked because i have another vps from chvps.com, the cheapest plan, i have mysite.com and mysite.net, I bought mysite.net, so no one can steal it, so i redirect users from mysite.net to mysite.com, I'm creating a new script for my site so chvps host mysite.net where i do some testing for the new version, like a staging server.

moreover i play with django on alwaysdata.com so I would like to get an editor.

I have seen many people saying that they love vim/vi, i will learn to use vim if you can tell me why vim is more powerful? aren't they all just editors?


To answer your question directly, here are a few CLI editors:

  • ne
  • joe
  • midnight commander's editor

As far as I know they won't show syntax errors as you type or even on save, you won't get any (semi)auto-completion either. All in all these are more powerful than nano but less powerful than NP++ (which I'm not familiar with) and a fortiori vim or emacs.

Anyway, a stock vim, even built with "huge" feature-set won't check the syntax of your PHP files as you type or on save, you'll need a bunch of plugins for that.

I don't know about emacs, but vim can be used in "easy" mode like this: vim -y yourfile.php.

Vim is one of the two best editors out there, learning its basics is not that hard. You probably don't have much time to spend on it right now but, once you do, try it. It rocks.

Can you tell us a bit more about your workflow (server layout, use of a VCS…)? At a glance it looks like you are editing files directly on a production server which is not really recommended.

<EDIT>

About Vim and all the others being just editors.

Yes they all have the same set of basic features: ability to input text, cut, paste, move the cursor… but even these basic features can be implemented in many manners. You say that you want NP++ features in a CLI editor, we can assume that you have tried other editors and ultimately decided to go with it because it worked better for you than the others.

All the CLI editors are different, like their GUI counterparts they shine in one place and lack in another. Because you are a programmer you "need" some advanced features and any editor not having a full fledged search/replace system supporting regex, some sort of auto-completion, macros, ability to build and show errors and so on.

Vim and Emacs both offer these fatures and sooo much more either natively or via plugins. As far as I know they are the only CLI editors really suited for programming so, to be able to work directly on your VPS, and be productive, you don't really have much choice: it's either one or the other.

The first problems you may be facing is the abruptness of the learning path and the weirdness of their "models" but most vim/emacs users will tell you that once its internalized it's hard to come back.

Why Vim (or emacs)?

I don't have a specific selling pitch to serve you. I was an advanced TextMate user, for me it was the best editor and it fitted all my needs but I was a little bored.

Then I stumbled on a Python screencast where everything looked magical to me and I found other screencasts by Dereck Wyatt and others and I was hooked: the way they moved through their code, the way they search/replaced, the omni-completion, the crazy plugins (surround rocks), the freaking motions and text-objects…

I took advantage of a slow week to learn the basics and make/revert a lot of mistakes and now I look at TextMate the same way you'd look at Notepad (not ++).

Here are a bunch of additional vim links for you:

  • One of the greatest answers here on SO
  • Coming home to Vim
  • Vi for smarties
  • The Physics of VIM
  • Vim Introduction and Tutorial
  • Ask HN: Suggestions for mastering vim?
  • Use Vim Like A Pro
  • Power Vim Usage
  • Why, oh WHY, do those #?@! nutheads use vi?
  • How I boosted my Vim

Ho, I just remembered another CLI editor: diakonos.

</EDIT>


If you asked allready a few times maybe the application you're looking for doesn't exists yet. I have to do the same things like you (edit files on the server, config and scripts) and I do it with jEdit with the langauge specific plugins plus FTP plugin. At least you could give it a try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜