I'm trying to make Vim play nice with wrapped lines and I'm running into some problems. The following linexnoremap <expr> k ((v:count == 0) || (mode() !=# V) ? 'gk' : 'k')gives me the following error when launching VimError detected while processing /cygdrive/c/Users/Chad/.vimrc:line   76:E749: empty bufferIf I remove either of the conditions the map will work fine but I'd like to combine them. Any ideas? Thanks in advance.
What is wrong with this mapping expression in my .vimrc?
key bindings
See :h map_bar. The | is used also as a command separator in vim, so you are executing a map command:xnoremap <expr> k ((v:count == 0) Then an empty command line, and after that a command:(mode() !=# V) ? 'gk' : 'k')To use the | character in mappings, the two best options in my opinion are <Bar> or \|. Your mapping can be written asxnoremap <expr> k ((v:count == 0) <Bar><Bar> (mode() !=# V) ? 'gk' : 'k')for example.