Nano not registering all the option in the .nanorc file - syntax-highlighting

so I came back on nano not long ago and tried to enable a few options in the ~/.nanorc file by writing the following:
include /usr/share/nano/python.nanorc
set autoindent
set tabsize 4
However, when I open a file as follow
nano file_name
so not using sudo, the only option that seems to show is the tabsize, there is no syntax highlighting, nor auto indents.
Also, the commented text appears in light blue, I don't know if that is by default or not.

Related

Green background on some directories [Oh My Zsh, Zsh]

I have a problem with my terminal / VS Code integrated terminal. When I'm changing directory some directories are with a green background and it's annoying. And I don't know how to disable it. I know that in .zshrc I can disable colors in ls with DISABLE_LS_COLORS="true" but this is not working with cd command.
In the default terminal, it is relatively readable, but in VS Code it is unreadable. Any help?
Add the following line to your .zshrc file
export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"
save the file and then run
source ~/.zshrc
You could just change it for vs code and over ride any theme by changing the settings.json file in settings --> search for workbench --> click edit in settings.json under colour customisations. This should override any theme present from any other add-ons or external terminal mods. I have not tested it before with zshrc though.
In the brackets enter something like this:
"terminal.foreground": "#839496",
"terminal.background": "#002833",
"terminal.ansiBlack": "#003541",
"terminal.ansiBlue": "#268bd2",
"terminal.ansiCyan": "#2aa198",
"terminal.ansiGreen": "#859901",
"terminal.ansiMagenta": "#d33682",
"terminal.ansiRed": "#dc322f",
"terminal.ansiWhite": "#eee8d5",
"terminal.ansiYellow": "#b58901",
"terminal.ansiBrightBlack": "#586e75",
"terminal.ansiBrightBlue": "#839496",
"terminal.ansiBrightCyan": "#93a1a1",
"terminal.ansiBrightGreen": "#586e75",
"terminal.ansiBrightMagenta": "#6c6ec6",
"terminal.ansiBrightRed": "#cb4b16",
"terminal.ansiBrightWhite": "#fdf6e3",
"terminal.ansiBrightYellow": "#657b83",
"terminalCursor.foreground": "#839496",
"terminalCursor.background": "#003541"

Finding config file (vimrc?) for VimR OSX

For the VimR OSX app, I want to change the default vim settings (like default colorscheme, or always having :set number), and read online that there's a vimrc file that should be changed, but for some reason I just can't find it on my computer.
Do you guys know where the vimrc (or whatever the vim config file is called) for VimR is?
Thanks!
VimR, (now?) tracking NeoVim, not Vim, isn't using ~/.vimrc by default any more:
User: I reinstalled VimR recently, and settings from my .vimrc are no longer loaded. Should I create some new dotfile and source .vimrc in it?
Author: NeoVim changed that: https://neovim.io/doc/user/nvim.html#nvim-from-vim
and to quote from the linked NeoVim docs:
Transitioning from Vim *nvim-from-vim*
To start the transition, create ~/.config/nvim/init.vim with these contents:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
in the code above. Nvim follows the XDG |base-directories| convention.

How do I apply changes on this editor?

While using GIT on the console and cherry picking this editor appeared. And I don't know how to apply/send the changes and move on
To save changes and quit, type :wq
Vim and Vi have different modes you can edit in. This allows users to use the main part of the keyboard for shortcuts ;)
If you are struggling to make changes in the first place, you have to enter insert mode by pressing i, then make your changes. You then have to go back to command mode by pressing Esc, then you can save and quit with :wq.
I agree with the other answers that you should use a different editor, unless you want to commit to learning Vim. Vim is great for learning to edit code super efficiently, but it's quite tricky to get your head around at first.
nano is another user friendly editor .
Unfortunately, nano does not come with the Windows version of Git.
You need to install nano.
Before making your first commit, try running:
nano
in the terminal. The result should be a simple editor with instructions at the bottom of the screen; close/quit with ctrl-X. If that worked.
git config --global core.editor nano
will configure Git to use the nano editor. The commands to use the text editor (like copy, paste, quit, etc.) will be shown on the bottom of the screen
This is a editor which git will launch according your default editor configuration.
Commonly, it is determined by your EDITOR environment variables, or configured by the the following command
sudo update-alternatives --config editor
You can do what I mentioned above to check what this editor is, and set your favorite editor to substitute it. After you change your default editor configuration, you can avoid this editor be launched again.

VsVim settings save file

I have VsVim and when I load my solution file, I always need to :set ignorecase and :set smartcase each time. I'd like to save these settings, but I can't find where VsVim stores its settings or how to save its settings.
This has recently changed:
https://github.com/jaredpar/VsVim/wiki/faq
How can I verify my .vimrc is loading?
There are 2 non-standard vim settings that can be used to diagnose potential .vimrc load issues
vimrc – This setting will display the full path of the file which was loaded for the .vimrc
vimrcpaths – This setting will display the files and paths searched for .vimrc
By default VsVim will look for a file named .vsvimrc, _vsvimrc, .vimrc or _vimrc file in the paths HOME, VIM and USERPROFILE
As of now the commands supported in the .vimrc file are limited to those supported in command mode.

Creating Gedit syntax files

I have started a new thread rather then reviving this one:
Creating your own syntax highlighting in GEdit?
Hope that was the right thing to do. I have created a syntax file for fish shell and placed it in /usr/share/gtksourceview-2.0/language-specs (in Ubuntu). When I open a .fish file with gedit there is no highlighting and the view-->high light mode menu does not show this fish as an option. Is there something that needs to be updated to allow the file to be recognized?
Thanks for reading-Patrick
Make sure you are in fact using Gedit 2 and not Gedit 3 (which uses gtksourceview-3.0). For the newer, 3.0 lang files, you can put them into ~/.local/share/gtksourceview-3.0/language-spec/
If you've installed it to the correct location, you should see the name you specified in the _name attribute in the View > Highlight Mode menu under the sub menu you specified with the _section attribute in your .lang file. For example, if I had test.lang with:
<language id="test" _name="Test Language File" version="2.0" _section="Markup">
Then I would see "Test Language File" under View > Highlight Mode > Markup in the Gedit menu.
As an alternative to /usr/share/gtksourceview-2.0/language-specs/, you could try putting it in ~/.gnome2/gtksourceview-2.0/language-specs/.
Assuming you've restarted gedit after installing your syntax file, then it may just be a syntax error. Try installing the Go syntax file (http://go-lang.cat-v.org/text-editors/gedit/), and if that shows up but your custom one still doesn't, then it's a problem with your file. If none of them show up, then you may need to re-install gedit or gtksourceview.
Also, make sure the permissions on your new file match those of the existing ones. I doubt gedit would need more than read permissions to be able to use the file, but it wouldn't hurt to check.

Resources