

Therefore this is likely a MacVim-specific problem.ī.) I was wrong to say this does not affect terminal Vim. Other filesystems seem to favor but not enforce UNF-C, composed. fileencodings is set to ucs-bom,utf-8,default,latin1 and fileformats to unix,dos,mac.Ī.) NFS+ requires file names to only contain characters in Unicode Normal Form D, that is, accented accented characters are decomposed. fileencoding defaults to encoding if it is not set, but I have also tried setting it explicitly before writing the buffer to file with no difference. But I have tested that it is already set by the time my vimrc is sourced (that's why I don't set it myself) so I figure that should be ok. I'm not sure where this option is set since latin1 is the default, I'm not setting it in my vimrc and :verbose set encoding doesn't tell me anything. Terminal Vim does not seem to have this problem.Įncoding is set to utf-8. There is no byte value 228 (ä) or 168 (¨) anywhere in the buffer. When I run it for a line with ja¨derberg.txt I get jaderberg.txt. I wrote a function to loop through all characters on the line and convert each to a number and back to a char, then write the results to the buffer. With the cursor on j and pressing l until end of line, here is how the line changes.

If I move the cursor over the characters ja¨derberg.txt in the buffer, they change. I'm not sure what other info is relevant, so ask and I'll add. I don't understand why Vim should fail to correctly display the decomposed ä that is actually stored in the file name, and only when I give the file name with a decomposed ä. This seems to correspond to a difference between composed and decomposed characters. I don't know much about this, but I can tell there is a difference between how Terminal treats the character ä that I type and the character ä that is stored in a file name and completed with.
TERMINAL IN MACVIM CODE
"Accented characters" can be stored as a single code point or as a series of code points. Why is my status line not displaying the file name correctly when I open MacVim from Terminal and tab-complete the filename? If I type mvim jä Terminal refuses to complete the file name. If in Terminal I type out the whole file name, mvim jäderberg.txt, everything is fine. The file opens, but the statusline displays ja¨derberg.txt. Now I run MacVim from Terminal by typing mvim j. I do i% to put the file name into the buffer and it puts jäderberg.txt. My status line displays the file name jäderberg.txt.

Simple actions crashes entire app (window disappears).In MacVim I type :tabe jäderberg.txt to open a buffer for that file. Last but not least, daily snapshots of MacVim are very unstable. I am not sure how's the implementation, but the documentation for terminal functionality in MacVim is minimal. So far I am not even sure if there is even a way to spawn a terminal under (instead of above) current buffer. I have no idea how hard it will be to read the Fzf output back in Vim or to cut through rough edges to streamline the user experience (closing extra buffers and such). I also tried other apps using tcell and those fail just like Fzf does. I tried some ncurses based apps and those work fine. Again, I have little experience with Go but this seems to be related to the fact Fzf uses tcell library. App is running but the visuals are all wrong. There is a problem with drawing inside the terminal. This worked fine so far, but then it turned out that Fzf just doesn't work at all in MacVim's terminal. I added another path for has('gui_macvim') and used :terminal with parameters to spawn Fzf. Looks like MacVim so far offers no such function but a command :terminal. Fzf detects if it's running in Neovim and then just uses build-in function termopen() to spawn inside the build-in terminal. I am completely new to vimscript but I did look around to see how hard it might be to get it running.
