网络技术

notepad++编辑器的爱恨纠结

凌晨看到一篇文章《notepad++如何显示隐藏的回车换行符?如何转换格式?》,这篇文章主要是讲使用notepad++做开发时常用的一项技能。我个人也是非常喜欢用notepad++的,但是有爱有恨啊。

 

notepad++有什么优势

代码编辑器中的功能是相当丰富的,一般主流的代码编辑器都有以下几项功能或特色:

    1. 主流的编辑器一般都开源、有活跃的社区,非常有助于自身进步。
    2. 支持安装和配置插件、主题。这其实也是开源的一部分。
    3. 多编程语言语法高亮、代码提示(或者补全格式)、支持正则表达式、包括什么定位行、打标记、复制当前文件名,文件路径、项目文件夹等等快捷操作。

第三项不用多说,大小编辑器或多或少都有这种功能。前两项是近几年来兴起的,因为审美和工作效率需要提速的需要吧,开源越来越被人们喜欢和接受以及开发大规模使用,所以有前两项就能成为主流。但是实质上notepad++在前两项上并不占优势,第三项功能里面比较齐全,而且有自己的特色,就是小巧精致。一般网速和电脑配置其实下载notepad++只需一秒,安装notepad++只需五秒就够。这一点其他编辑器基本做不到,其实sublime也算较快,以后再说。

分析不同阶段和编程语言在什么条件下合适用notepad++

写代码的人大概分为三个阶段吧,学习、开发、维护。不管是学习还是开发还是维护,基础的都是四件事,其他编辑器的功能先不说。前两件事就是ctrl+c、ctrl+v,这个也没什么好说就是借鉴代码呗,后两件事就是写代码和改代码。下面就从不同阶段和不同的编程语言来说说notepad++的利弊。

学习阶段:

学习阶段里面的写,其实写不了多少的,只要是个代码编辑器就可以完成。不管是java、c、html、php。其实都差不多,前期编程语言的语法基本都简单,不涉及大量写和大量替换。但是学习阶段使用notepad++不便于修改前端以外的其他语言。比如写一段java和eclipse对比看看:

notepad++和eclipse对比java-纠错:

可以看到notepad++是没有纠错功能的,我不知道有没有相关纠错插件或者其他方法。如有请补充赐教,不胜感激。但是eclipse相比就强大了,在第四行输入e,第四行报错,再输入一个全角的问号,第三行报错。这个就不解释了。

 

notepad++和eclipse对比java-补全:

  1. notepad++补全:
  2. eclipse的补全:

    说到这,再提一下eclipse的补全设置。打开(窗口)window-(偏好)perferences-(选择语言java)Java-(编辑器)Editor-(内容辅助)Content Assist,在(自动补全/或者叫输入提示)Auto Activation的第二行(自动触发java的输入提示)Auto activation triggers fo Java的后面输入.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ点击(保存并关闭)apply and close,即可。注意前面有个点(.)

可以看到在代码补全上notepad++还是挺适合初学者使用的。但是仅限于在入门阶段。

 

当然写html、css、js这些还是够用的。蓝色标签,红色标签属性,紫色属性内容,黑色输出内容,绿色注释,这个默认的文字颜色看着就非常舒服了。

 

开发阶段:

复制粘贴还是不用说。开发阶段还拿java举例,这个就不贴图了,大家可以试试,在notepad++里面写ssl,出现的提示只有两个,SslRMIClientSocketFactory和SslRMIServerSocketFactory,只有这两个。但是在eclipse里面会出现SSLContextSpi、SSLEngine、SSLHandshakeException、SSLProtocolException等几十个匹配结果,而且会自动补全import javax.net.ssl.SSLContextSpi;这些,非常有助于提升效率,但是偶尔我用notepad++,有些东西就感觉是快要写不出来了。

至于debug什么的,就可以不需要说了。

所以这个说了其实也等于没说……用过的都知道。如果是需要大量后端、动态语言工作需要控制台调试的语言,就放弃用notepad++吧。

维护阶段:

notepad++占用内存特小特小,可以同时打开上千文件,这个维护阶段主要就是就涉及到正则了,关于在notepad++中正则的使用下一篇文章单独写。

 

为何还不卸载notepad++

  1. 不占ram,卸载了也节省不了多少磁盘空间。
  2. 也不占rom,运行特快,基本没有卡死未响应过,曾因查找流氓广告同时打开1000多php文件,8G内存就没有问题!用来查找替换(包括正则)
  3. 用了好多年,快捷键也记得很清楚了,也还没至于和其他编辑器快捷键搞混,也非常顺手,实在不想放弃。
  4. 有个愿望就是写个插件,功能是按一下某个快捷键出来四个空格,水平太次没能实现,当然如果要按ctrl+shift+alt+?那就算了,还不如按四下空格[滑稽]。
  5. 比较编辑器和IDE还是有区别的,要求太多也不合适,物尽其用吧,总能用得到的,必备。水到这了……

72 thoughts on “notepad++编辑器的爱恨纠结

  1. Wow that was strange. I just wrote an very long comment but after I clicked submit my comment didn’t appear.
    Grrrr… well I’m not writing all that over again. Anyways, just wanted to say
    fantastic blog!

  2. Its like you read my mind! You seem to know so much about this,
    like you wrote the book in it or something. I think that
    you could do with some pics to drive the message home a bit, but
    instead of that, this is great blog. A great read.

    I will definitely be back.

  3. Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is valuable and everything. But just imagine
    if you added some great pictures or video clips to give your posts more, “pop”!
    Your content is excellent but with pics and clips, this site could certainly be one of the most
    beneficial in its field. Very good blog!

  4. It’s the best time to make a few plans for the long run and
    it is time to be happy. I have learn this put up and if I could I want to recommend you
    some fascinating things or suggestions. Perhaps you
    could write subsequent articles relating to this article. I desire to learn even more things approximately it!

  5. Can I simply say what a comfort to uncover someone who really knows
    what they’re discussing on the web. You certainly understand how to bring a problem to light and make
    it important. More and more people have to check this out
    and understand this side of the story. I was surprised you aren’t more popular since you
    definitely have the gift.

  6. Hello, Neat post. There’s a problem together with your website in internet explorer, might
    check this? IE still is the marketplace chief and a large part of folks will
    leave out your fantastic writing because of this problem.

  7. I was curious if you ever considered changing
    the page layout of your website? Its very
    well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it
    better. Youve got an awful lot of text for only having 1 or 2 pictures.
    Maybe you could space it out better?

  8. Have you ever thought about including a little bit
    more than just your articles? I mean, what you say is valuable
    and everything. However think of if you added some great photos or videos to give your posts more, “pop”!
    Your content is excellent but with pics and clips, this blog
    could certainly be one of the greatest in its niche.
    Awesome blog!

  9. Link exchange is nothing else except it is only placing the other person’s website link on your page
    at suitable place and other person will also do similar in support
    of you.

  10. Hello There. I discovered your blog the usage of msn. This is a really neatly written article.

    I will be sure to bookmark it and come back to learn extra
    of your helpful information. Thanks for the post.
    I will certainly return.

  11. You could certainly see your enthusiasm within the work you write.
    The world hopes for even more passionate writers such as you who aren’t afraid to say how they believe.

    At all times go after your heart.

  12. Please let me know if you’re looking for a article author for your
    blog. You have some really great posts and I think I would be a good asset.
    If you ever want to take some of the load off, I’d really like to write some
    content for your blog in exchange for a link back to mine.
    Please shoot me an e-mail if interested. Kudos!

  13. Hi, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam responses?
    If so how do you stop it, any plugin or anything you can advise?

    I get so much lately it’s driving me mad so any help is very much appreciated.

  14. Hey there this is kinda of off topic but I was wondering if blogs use WYSIWYG
    editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding experience so I wanted to get advice
    from someone with experience. Any help would be enormously appreciated!

发表评论

电子邮件地址不会被公开。 必填项已用*标注

答案 : *
28 − 20 =


返回顶部