Tag Info

Hot answers tagged

19

The nano editor provides syntax highlighting for a few languages and scripts by itself. Check out /usr/share/nano/ nits@nits-excalibur:~$ ls /usr/share/nano/ asm.nanorc fortran.nanorc man.nanorc ocaml.nanorc ruby.nanorc awk.nanorc gentoo.nanorc mgp.nanorc patch.nanorc sh.nanorc c.nanorc groff.nanorc mutt.nanorc ...


17

Ctrl + G will let you read the help. nano can do some pretty nice things so you might want to pootle around in there for a bit. When you see ^G (et al) it means Ctrl + G. In the help pages, M-H means Alt + H. How can I open text files for editing? This is the default in nano. Open and file and you're set to start editing: nano filename Note: you won't ...


16

Ctrl + W is the shortcut for searching. After entering the search term, press Enter. To repeat the search, issue Alt + W. In this menu, you can select earlier searches using the arrow up/ down keys. To toggle backwards searching, you need to press Alt + B in the search dialog. For more shortcuts, press F1


15

To display the line & column number position you could just use the -c parameter i.e. nano -c [filename] nano uses a configuration in your home folder ~/.nanorc Thus to display line numbers... nano ~/.nanorc (don't worry if its empty - this file doesn't exist by default) type set const Save


9

From the nano Command Manual: -E, --tabstospaces Convert typed tabs to spaces. -T <#cols>, --tabsize=<#cols> Set the displayed tab length to #cols columns. The value of #cols must be greater than 0. The default value is 8. For four spaces, the appropriate command would therefore be nano -ET4. Consider creating a permanent alias.


7

Yes you could save it temporarily to your home directory.Press Ctrl+O to change the path to your home directory or in /tmp and then press Enter to save it.Then you can sudo mv it. Press CTRL+O will show you the path.Change that to your home directory or /tmp.For example File Name to Write: /tmp/filename and press enter.


6

Press the following keys in order, one at a time: F9 Activates the top menu. o Selects the Option menu. c Opens the configuration dialog. i Toggles the use internal edit option. s Saves your preferences.


3

Sadly, I don't think this is possible. I've found a thread where a nano developer said: Hi, I've searched high and low trying to find out if it's possible to navigate through the text with CTRL left/right-key to jump word by word... Unfortunately, no. Meta-Space and Ctrl-Space are the only keys to do that. This is because in ...


3

In the bottom text the ^ stands for Ctrl and M- stands for Alt So^G is Ctrl-G and M-Y is Alt-Y (that one toggles the colors). You can toggle line truncation with M-$. See the help pages (^G) for more functions.


3

The combination of ^ and a letter means you're supposed to press Ctrl and that letter. So when nano says ^X Exit that means you're gonna quit naony by pressing Ctrl+X. To open a file called /etc/nanorc you can start nano with: nano /etc/nanorc Note that /etc/groups is not writeable by regular users, therefore you need sudo: sudo nano /etc/nanorc If ...


3

nano does not support deleting a block of text, only cutting it (to the server's clipboard). Instead, if you are using Putty, do the following: Select the text you wish to copy to the clipboard with the mouse first -- this copies it to your local clipboard (i.e. Windows 7 clipboard), which nano can't touch: Then, select your block in nano and use Ctrl-K ...


2

Mindterm is a browser-based, Java-applet SSH client. Copy/paste may be available using either the Edit menu or the Ctrl+Ins (Copy) or Shift+Ins (Paste) shortcuts: Copy/paste from your local clipboard may not be available depending on the version of Java you have installed and Mindterm's settings by Amazon In that case, use a native SSH client such as the ...


2

The file /etc/nanorc contains some options that should allow you to customize the shortcuts used on the editor. Please note that this is a global config file and will modify the options for all users on your system. Further details on the available options are given on the man nanorc page (the list is just too big to reproduce here): It should be ...


2

You have mistaken word wrap for line breaks. Compare: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum ...


2

You can changes keybinding in Geany from edit, preferences. The 2 you mention: But you probably want this one:


2

The terminal emulation handles that already. If a key combination with ALT is used by the terminal itself, you can just substitute ALT with ESC. For example, if you want to count characters, words and lines in nano and ALT+D is used by the terminal, just type ESC+D.


2

nano depends on a spell-checker program. Such a program is aspell, install it with: sudo apt-get install aspell


1

There is a solution to this problem. Redefine Ctrl-Left and Ctrl-Right in your Terminal program to seldom-used keys, such as F13 and F14. Then in ~/.nanorc: bind F13 prevword main bind F14 nextword main Now, a shortcoming, for me at least, is that it will only work when you're using the Terminal program you used for the key redefinition. For example, in ...


1

I don't know of an existing highlight for C# in Nano but you could write your own. The syntax for syntax highlighting is pretty simple. Here's the one for Java (which will be very similar to a C# syntax - mainly just different keywords): ## Here is an example for Java. ## syntax "java" "\.java$" color green ...


1

Well, that guide is trying to install eclipse system-wide. There is usually no reason to do that, if you can get away with not doing it. Just extract the archive and run eclipse (./eclipse from the command prompt, once you have cd'd into the directory). It even works without using the command line at all.


1

man nanorc(5): color fgcolor,bgcolor regex For the currently defined syntax, display all expressions matching the extended regular expression regex with foreground color fgcolor and background color bgcolor, at least one of which must be specified. Legal colors for foreground and background color are: white, black, red, blue, green, yellow, ...


1

Most clients copy each other's main functionality, you can try copy the text, go into the the the mindterm and do SHIFT + INSERT or copy the text and put the cursor where you want to paste and do a right click. [http://www.astro.umd.edu/resources/internal/ssh/MindTerm_User.pdf] this worked for me for a lot of clients.



Only top voted, non community-wiki answers of a minimum length are eligible