How to Install Best Open Source Text Editors


Text editors can be utilized for writing code, enhancing text files such as configuration records, developing person guideline documents and plenty of extra. In Linux, text editors are of two kinds ie., graphical user interface (GUI) and command line text editors. This article explains about how to install best Open Source Text Editors.

Vi/Vim Editor

Vim is designed for use of both command-line interface and as a standalone application in a graphical user interface. Vim is free and open source software and is released under a license that includes some charity ware clauses. To install vim editor,use the following command –

$ sudo apt-get install vim

The sample output should be like this –

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   apport-hooks-elementary contractor javascript-common libgda-5.0-4
   libgda-5.0-common libgranite-common libgranite3 libgsignon-glib1
   libindicate5 libjs-jquery libnoise-core0 libtagc0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
   vim-runtime
Suggested packages:
   ctags vim-doc vim-scripts vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2
   | vim-athena-py2 | vim-nox-py2
The following NEW packages will be installed:
   vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 36 not upgraded.
Need to get 6,184 kB of archives.
After this operation, 29.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1 [5,175 kB]
..................................................................................................

To open vim text editor, use the following command –

$ vim

The sample output should be like this –

~
~
~
~
~          VIM - Vi IMproved
~
~          version 7.4.1689
~       by Bram Moolenaar et al.
~    Modified by pkg-vim-maintainers@lists.alioth.debian.org
~ Vim is open source and freely distributable
~
~       Become a registered Vim user!
~    type :help register for information
~
~    type :q to exit
~    type :help or for on-line help
~    type :help version7 for version info
~
~
~
~
~
                                       0,0-1 All

To get more information about vim text editor, use the following command –

$ vim -h

The sample output should be like this –

IM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 08 2016 11:38:28)

usage: vim [arguments] [file ..]       edit specified file(s)
   or: vim [arguments] -                read text from stdin
   or: vim [arguments] -t tag             edit file where tag is defined
   or: vim [arguments] -q [errorfile]    edit file with first error

Arguments:
   --            Only file names after this
   -v            Vi mode (like "vi")
   -e            Ex mode (like "ex")
   -E            Improved Ex mode
   -s            Silent (batch) mode (only for "ex")
   -d            Diff mode (like "vimdiff")
   -y            Easy mode (like "evim", modeless)
   -R            Readonly mode (like "view")
   -Z            Restricted mode (like "rvim")
   -m            Modifications (writing files) not allowed
   -M            Modifications in text not allowed
   -b            Binary mode
   -l            Lisp mode
   -C            Compatible with Vi: 'compatible'
   -N            Not fully Vi compatible: 'nocompatible'
   -V[N][fname]  Be verbose [level N] [log messages to fname]
   -D            Debugging mode
   -n            No swap file, use memory only
   -r            List swap files and exit
   -r (with file name)   Recover crashed session
   -L            Same as -r
   -A            start in Arabic mode
   -H            Start in Hebrew mode
   -F            Start in Farsi mode
   -T             Set terminal type to
   --not-a-term   Skip warning for input/output not being a terminal
   -u             Use instead of any .vimrc
   --noplugin     Don't load plugin scripts
   -p[N           ]Open N tab pages (default: one for each file)
   -o[N]          Open N windows (default: one for each file)
   -O[N]          Like -o but split vertically
   +              Start at end of file
   +              Start at line
   --cmd          Execute before loading any vimrc file
   -c             Execute after loading the first file
   -S             Source file after loading the first file
   -s             Read Normal mode commands from file
   -w             Append all typed commands to file
   -W             Write all typed commands to file
   -x             Edit encrypted files
   --startuptime  Write startup timing messages to
   -i             Use instead of .viminfo
   -h    or       --helpPrint Help (this message) and exit
   --versionPrint    version information and exit

Gedit

gedit is the default text editor of the GNOME desktop environment and part of the GNOME Core Applications. Designed as a general-purpose text editor, gedit emphasizes simplicity and ease of use, with a clean and simple GUI, according to the philosophy of the GNOME project. It includes tools for editing source code and structured text such as markup languages. To install Gedit editor, It should required supported repositories as shown below –

$ sudo add-apt-repository ppa:ricotz/staging
$ sudo add-apt-repository ppa:gnome3-team/gnome3
$ sudo add-apt-repository ppa:gnome3-team/gnome3-staging
$ sudo add-apt-repository ppa:ricotz/testing

Now update local repository index as using update command as shown below –

$ sudo apt-get update

To Install Gedit, use the following command –

$ sudo apt-get install gedit

The sample output should be like this –

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   apport-hooks-elementary contractor javascript-common libgda-5.0-4
   libgda-5.0-common libgranite-common libgranite3 libgsignon-glib1
   libindicate5 libjs-jquery libnoise-core0 libtagc0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
   gedit-common libgail-3-0 libgspell-1-1 libgtk-3-0 libgtk-3-common
   libgtksourceview-3.0-1 libgtksourceview-3.0-common libwayland-client0
   libwayland-cursor0
Suggested packages:
   gedit-plugins
The following NEW packages will be installed:
   libgspell-1-1
The following packages will be upgraded:
   gedit gedit-common libgail-3-0 libgtk-3-0 libgtk-3-common
   libgtksourceview-3.0-1 libgtksourceview-3.0-common libwayland-client0
   libwayland-cursor0
9 upgraded, 1 newly installed, 0 to remove and 132 not upgraded.
Need to get 8,882 kB of archives.
.................................................................

To open gedit editor,use the following command –

$ sudo gedit

To get more information about gedit, use the following command –

$ gedit -h

The sample output should be like this –

Usage:
gedit [OPTION...] [FILE...] [+LINE[:COLUMN]]

Help Options:
   -h, --help             Show help options
   --help-all             Show all help options
   --help-gapplication    Show GApplication options
   --help-gtk             Show GTK+ Options

Application Options:
   -V, --version                  Show the application's version
   --list-encodings               Display list of possible values for the encoding option
   --encoding=ENCODING            Set the character encoding to be used to open the files listed on the command line
   --new-window                   Create a new top-level window in an existing instance of gedit
   --new-document                 Create a new document in an existing instance of gedit
   -g, --geometry=GEOMETRY        Set the size and position of the window (WIDTHxHEIGHT+X+Y)
   -w, --wait                     Open files and block process until files are closed
   -s, --standalone               Run gedit in standalone mode
   --display=DISPLAY              X display to use

Geany Editor

Geany is a lightweight GUI text editor using Scintilla and GTK+ which includes some basic IDE features. It is designed to have short load times, with limited dependency on separate packages or external libraries on Linux. It has been ported to a wide range of operating systems, such as BSD, Linux, Mac OS X, Solaris and Windows. Among the supported programming languages and markup languages are C, C++, C#, Java, JavaScript, PHP, HTML, LaTeX, CSS, Python, Perl, Ruby, Pascal, Haskell, Erlang, Vala and many others.

To install Geany Editor, use the following command –

$ sudo apt-get install geany geany-common

The sample output should be like this –

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
   apport-hooks-elementary contractor javascript-common libgda-5.0-4
   libgda-5.0-common libgranite-common libgranite3 libgsignon-glib1
   libindicate5 libjs-jquery libnoise-core0 libtagc0
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
   geany geany-common
0 upgraded, 2 newly installed, 0 to remove and 132 not upgraded.
Need to get 2,772 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 geany-common all 1.27-1 [1,795 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 geany amd64 1.27-1 [977 kB]
Fetched 2,772 kB in 2s (1,018 kB/s)
Selecting previously unselected package geany-common.
(Reading database ... 183072 files and directories currently installed.)
Preparing to unpack .../geany-common_1.27-1_all.deb ...
Unpacking geany-common (1.27-1) ...
Selecting previously unselected package geany.
Preparing to unpack .../geany_1.27-1_amd64.deb ...
Unpacking geany (1.27-1) ...
Processing triggers for doc-base (0.10.7) ...
.............................................................................

To open Geany Editor, use the following command –

$ geany

The sample output should be like this-

To get more information about geany, use the following command –

$ geany -h

The sample output should be like this –

Usage:
   geany [OPTION...] [FILES...]

Help Options:
   -h, --help                    Show help options
   --help-all                    Show all help options
   --help-gtk                    Show GTK+ Options

Application Options:
   --column                      Set initial column number for the first opened file (useful in conjunction with --line)
   -c, --config                  Use an alternate configuration directory
   --ft-names                    Print internal filetype names
   -g, --generate-tags           Generate global tags file (see documentation)
   -P, --no-preprocessing        Don't preprocess C/C++ files when generating tags file
   -i, --new-instance            Don't open files in a running instance, force opening a new instance
   --socket-file                 Use this socket filename for communication with a running Geany instance
   --list-documents              Return a list of open documents in a running Geany instance
   -l, --line                    Set initial line number for the first opened file
   -m, --no-msgwin               Don't show message window at startup
   -n, --no-ctags                Don't load auto completion data (see documentation)
   -p, --no-plugins              Don't load plugins
   --print-prefix                Print Geany's installation prefix
   -r, --read-only               Open all FILES in read-only mode (see documentation)
   -s, --no-session              Don't load the previous session's files
   -t, --no-terminal             Don't load terminal support
   --vte-lib                     Filename of libvte.so
   -v, --verbose                 Be verbose
   -V, --version                 Show version and exit
   --display=DISPLAY             X display to use

After this article, you will be able to understand – “How to install best Open Source Text Editors” . In our next articles, we will come up with more Linux based tricks and tips. Keep reading!

Updated on: 20-Jan-2020

188 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements