If you don't already have a .vimrc file in your home directory, create one using this:
Add this line to the top of the file:
Save the file and this should fix the problem for you. :)
For short files:
directly shows a text file in the terminal.
For longer files:
lets you scroll and search (/ text to search Enter) in the file; press q to exit.
These instructions assume that you have installed Sublime Text 3 using the .deb file provided for Ubuntu. If you downloaded the tarball and installed it manually, you will need to change the paths below to your install location.
First, make sure that /usr/share/applications/sublime_text.desktop exists (sublime-text.desktop on some systems):
Installing the vim package will fix the problem:
sudo apt-get install vim
There are many good vim/vi tutorials on YouTube, or the web generally.
For your problem, see the article 8 Essential Vim Editor Navigation Fundamentals.
Then continue to open files as usual:
This tool is the most commonly available I have found for this type of task (available by default on both latest Ubuntu and macOS). You can remove the ascii readable part on the right if needed using -p and you can revert (change ascii input to binary data) using the -r function. Here are some simple example uses:
Converting to hex with ascii view:
Actually you can install Notepad++ by installing wine first:
sudo apt-get update; sudo apt-get install wine
But some good alternatives are:
kate (in KDE, running in unity with the installation of the proper
Sublime (free, unlimited trial version/ or $70.00 US Dollars)
Komodo Edit (in KDE)
Of these, Geany ...
Thanks to the work of Daniel Di Sardi there is an editor inspired to Notepad++ for Linux:
Notepadqq is a Notepad++-like editor for the Linux desktop.
It has a nice PPA (the home page says it's for 14.04, but the launchpad has versions from Utopic to Xenial), so you can install easily by
sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get ...
By default its prompt is the empty string. If you want to quit, just enter q. Don't prefix with :. If you have unsaved changes, it will reply with ?. You can interpret that as "are you sure?", and confirm by commanding q again. By the way any command it doesn't understand will also cause it to reply ?. That's the only error message it knows.
If you want a text editor, there is no such a thing as bold.
Plain text is plain text. The bold, italic, colored thing you see in a programming editor like gedit, geany, kate, etc. is syntactic highlight, added by the editor to facilitate the reading and writing of programs or whatever --- it is not stored with the text.
Now, you can leverage this to see ...
So, vim.basic is just plain vanilla Vim (as you can check with apt-file vim.basic or dpkg -S /usr/bin/vim.basic).
While vim.tiny, as the name implies, is a trimmed-down version of Vim (this question explains it further).
Kudos for @terdon at comments for sorting that out.
I think Answers by Muzaffar and Terrance serves your need. One thing to note is that you can install any of these text editors in any flavors.
GUI Text Editors
Gedit is certainly the most famous text editor in the Ubuntu world. Gedit is also available for Windows and MacOS. To ...
Don't use a text editor for viewing text.
There are better tools:
View files with less (Scroll with Space, End, Home, PageUp, PageDown; Search with "/something" ; Leave with q).
From less manual:
Less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi (1).
How to find out what this editor is
Press Ctrl+Z. This suspends the editor and gives you a shell prompt. At the prompt, run ps to see what processes are running in this terminal.
bash-4.3$ crontab -e
+ Stopped crontab -e
PID TTY TIME CMD
26295 pts/10 00:00:00 bash
26297 pts/10 00:00:00 crontab
Another alternative is vim.
Once you opened a file with vim you can insert text by typing i, for instance. If you want to save your file use :w (write) or :q (quit) or :wq (for write and quit) or :q! (quit and do not save). Sometimes you need to hit the ESC key to be able to type the commands.
Vim requires some learning, but is widely ...
There is also DHEX
apt-cache show dhex
ncurses based hex editor with diff mode
This is more than just another hex editor: It includes a diff mode,
which can be used to easily and conveniently compare two binary files.
Since it is based on ncurses and is themeable, it can run on any
number of systems and scenarios. With its utilization of ...
It is actually possible to install Notepad++ on Ubuntu. Just run the following commands:
sudo apt-get update
sudo apt-get install wine
Then, download the Notepad++ Windows installer, right click it, and select Open With -> Wine Windows Program Loader. Follow the typical installation process and you should be able to open Notepad++ from your Dash.
Option 1: use vim, emacs, geany, and many more!
In vim and use :!bash file.sh or just create a shortcut for it in .vimrc
In Emacs, you use M-!. So you hold down Alt and then press !. You can even pass text in your current buffer to a command by selecting what you want to pass to a command and then pressing M-|. So you can highlight your code and pass it to ...
Flavors of Ubuntu can change all the time and so can the default GUI editors. Instead of trying to remember all the default GUI editors of each distro, as long as the xdg-utils are installed you can run a simple command of xdg-open so you know what the default editor is and can launch it editing a text file:
xdg-open can also ...
The stream editor,sed, is a powerful utility for this kind of work and is my first choice, however, if you want to do this from an ordinary text editor using an Ubuntu based native application, I would suggest you take a look at Jedit, It is available in the repositories and can be installed by typing in your console:
sudo apt-get install jedit
With vi, when clicking on i you activate the command to Insert text.
This command allows you to insert text in your file.
And right, when clicking :
on ↑ it will insert a "A",
on ↓ it will insert a "B",
Till you deactivate this command.
To deactivate a command in vi : just click on Esc
And then you will get back normal use of your arrow keys:
↑ to go ...
You can't select with mouse and delete text using nano editor. For faster delete you can use Ctrl + K to delete(cut) the present line of text.
Note : Ctrl + K will cut the line of text. Using Ctrl + U you can paste it.
EDIT: Additional Info from steeldriver
You can select and cut something other than the current line using Ctrl-^ to mark the start of ...
Geany is a small and lightweight integrated development environment.
It was developed to provide a small and fast IDE, which has only a few
dependencies from other packages. It is using only the GTK2 toolkit
and therefore you need only the GTK2 runtime libraries to run Geany.
As a long time Gedit user, I shifted to Geany last year as my main ...
Unlike Unix where a new line is represented by a LF character we need a combination CR/LF for files in DOS/Windows:
We can let Gedit save text documents with Windows-style line endings in the File -> Save as dialog.
Adjust the settings for Line Endings in the drop down menu to Windows.
To make nano write text files in DOS format we have to ...