• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Alternative text editor?

Scheduled Pinned Locked Moved General pfSense Questions
10 Posts 5 Posters 10.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mattlach
    last edited by Jun 5, 2016, 10:52 PM

    Hey all,

    I don't know if it is just me, but VI in pfsense seems horribly broken.  I use VIM all the time in Linux, so I am familiar with the interface and commands, but there is just something completely wrong with this vi implementation.  Backspace doesn't work.  the i command to type doesn't always stick.  Pushing up or down to navigate when typing can cause everything to explode and all kinds of characters repeat all over the screen.

    I have literally tried to edit this one text file over 20 times now to make a tiny change, and each time, something goes wrong, and I find myself having to force quit (q!) and start over so I don't wreck the file.

    Is there a way to install vim, or maybe even nano (works, albeit over-simplified) in 2.3.1?  I know it used to be possible to install FreeBSD packages in previous versions of pfSense, but apparently that is no longer the case (Why on earth would you give up that capability???)

    I'd appreciate any suggestions.

    –Matt

    1 Reply Last reply Reply Quote 0
    • K
      kpa
      last edited by Jun 6, 2016, 9:15 AM

      Well.. it's definitely not broken. It's just how the vi editor worked back in the days of when mainframes were used with the VT terminals, for example the old terminals like many other computer keyboards at the time didn't have cursor keys so you're expected to know to use the jkhl keys. Try the ee editor that's included by default in FreeBSD and pfSense.

      1 Reply Last reply Reply Quote 0
      • 2
        2chemlud Banned
        last edited by Jun 6, 2016, 10:14 AM

        Sorry, but these days are over.

        And is ee really a step towards better usability? http://gsp.com/cgi-bin/man.cgi?topic=ee

        Why not moving forward and have something like nano onboard without any mess? vi can stay for the pensioners still wanting it, but some alternative would be really good…

        1 Reply Last reply Reply Quote 0
        • K
          kpa
          last edited by Jun 6, 2016, 10:17 AM

          It would have to be from a package because licensing conflicts prevents importing of nano (for example) to the FreeBSD base system because it's GNU licensed.

          1 Reply Last reply Reply Quote 0
          • F
            fragged
            last edited by Jun 6, 2016, 10:22 AM

            ee works fine enough, I don't see why you would need nano on pfSense. It's not like you need to edit files on the system that often.

            1 Reply Last reply Reply Quote 0
            • K
              kpa
              last edited by Jun 6, 2016, 10:25 AM

              Nano is actually in the packages for 2.3.1, installed as any package:

              
              pkg install nano
              
              

              I do agree that a text editor like vi is not needed that often. There are graphical SSH clients like WinSCP and Filezilla that can be used for editing files. The webgui has a very rudimentary editor as well. In case you need to do disaster recovery on for example /etc/fstab the ee editor is more than enough for that.

              1 Reply Last reply Reply Quote 2
              • 2
                2chemlud Banned
                last edited by Jun 6, 2016, 11:33 AM Jun 6, 2016, 11:25 AM

                @fragged:

                ee works fine enough, I don't see why you would need nano on pfSense. It's not like you need to edit files on the system that often.

                Totally agree, but if you have to, then messing around with something like vi is PITA, at the very best…

                kpa, thank you, I knew that nano is available, but normally I simply forget to install, until I need it... ;-) That's why it should be there from the start. License mess not on my list, sorry for that! :-)

                PS: nano is not in the list of packages in the GUI, correct? Will installation survive the next update? It is not in the config.xml when installed manually, correct?

                1 Reply Last reply Reply Quote 0
                • M
                  mattlach
                  last edited by Jun 6, 2016, 5:00 PM

                  @kpa:

                  It would have to be from a package because licensing conflicts prevents importing of nano (for example) to the FreeBSD base system because it's GNU licensed.

                  What about vim?

                  I actually kind of like vim.  Why not have it be the default instead of vi?  If this is how vi is supposed to behave, then vim is vastly superior.

                  1 Reply Last reply Reply Quote 0
                  • K
                    kpa
                    last edited by Jun 6, 2016, 7:25 PM Jun 6, 2016, 7:21 PM

                    @mattlach:

                    @kpa:

                    It would have to be from a package because licensing conflicts prevents importing of nano (for example) to the FreeBSD base system because it's GNU licensed.

                    What about vim?

                    I actually kind of like vim.  Why not have it be the default instead of vi?  If this is how vi is supposed to behave, then vim is vastly superior.

                    Too many dependencies to be included in the base system and importing anything to the base system is done only if it's a crucial functionality that can not be satisfied by installing a package/port. The console only version of vim that you can build by turning off the X11/GUI options in the port would be fine as a pfSense package I think.

                    1 Reply Last reply Reply Quote 0
                    • C
                      cmb
                      last edited by Jun 7, 2016, 1:12 AM

                      Nothing broken with vi. If backspace doesn't work, your terminal type is screwed up. ctrl-h will likely backspace in that case.

                      nano and vim-lite are available for those who want another option. Those are available via pkg install, but not in the GUI's package manager. They'll be kept up to date by the upgrade process just like any other package, only diff is if you reinstall the system and restore the config, or restore the config to a diff system, that package won't be reinstalled by restoring the config.

                      But those will be equally broken if your terminal type is wrong.

                      1 Reply Last reply Reply Quote 1
                      10 out of 10
                      • First post
                        10/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received