How to set up a default editor when using Fish shell in Manjaro

I’m trying to set up my console (I use Fish shell) to have Vim as the default editor, but can’t seem to make it persistent.

From what I understand, the following should work, but it seems to get defaulted back to nano after a reboot:

set --global EDITOR /bin/vim

What is the right™ approach to this instead?

My bad, it seems I misremembered – the correct one is:

set --universal EDITOR /bin/vim

doesn’t the fish shell have startup files like, for instance bash and zsh
where this can be set globally?

It has ~/.config/fish/, but typically you edit those through commands instead of editing them directly.

e.g. for look and feel you run


which opens up a webUI in your browser where you can preview and edit the colourschemes, prompts etc.

For functions/scripts, you typically run:

function {$function_name}

to write a new function/script that you want to use either just in this session, or save it for later.

funced {$function_name}

if you want to edit it; and

funcsave {$function_name}

if you want to save it so it persists between sessions.

If you want to list all the currently active functions:


and with:

functions {$function_name}

to print out that function.

What’s really cool about it is that it automagically syntax highlights and takes care of the structure of the script, while you write, view or edit it :slight_smile:

ok - thanks for that information about fish :+1:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.