I just switched from bash to zsh on my arch linux install and want to change my keybinding so that ctrl + arrow skips a word forward/backward. If I addbindkey ^[[1;5C forward-wordbindkey ^[[1;5D backward-wordit works for the current session, but once I restart my terminal I have to redo this. Could anyone tell me how I can save my keybindings in zsh?
New keybindings in ZSH are not saved
zsh;keyboard shortcuts
As a rule, shells just execute the commmands they're given, they don't automatically save their state. It's common to have different state in different shell instances (e.g. settings depending on the current directory). While it isn't very common to have different sets of key bindings, it can be useful (for example with different keyboards when accessing the same machine from different devices).The principle of command line shells is that what you type on a command line can equivalently be placed into a script file. So if you know how to do something by typing a command line, you know how to make it automatic: put it in a script file. To apply a setting to all shell sessions, put it in the shell's startup file. For interactive zsh sessions, that's ~/.zshrc, i.e. the file called .zshrc in your home directory.