3

Edit: Solved. See GitHub: amix/vimrc#204.

I often drop a shell out of my vim window by :!bash but I have two problems with it.

  • I can't use UTF8 for pipes
  • with QWERTZ layout, I can't use Umlaut keys like öäü, i.e. ö behaves like ALT-_

I think the problems are somehow related.

Is there anything I missed regarding both problems?

criztovyl
  • 151
  • 6
  • 1
    I've no idea where your problems come from but I wonder if using :!bash is actually a good thing: I think that :! is meant to execute a single command but not to start an interactive shell. If you really need to execute several commands in an external shell why don't you directly the external shell? – statox Mar 19 '16 at 13:04
  • 1
    Can you give us more details please? For example, what is your OS or distribution (including version), your bash version and the output of vim --version? When you answer, we willl take it from there. – Alexandre Martins Mar 19 '16 at 14:00
  • FYI. My system works perfectly and I just want to try and reproduce your problem. I use Ubuntu 14.04 with regular vim-gtk package with what is mostly the vimrc_example file that comes with vim. – Alexandre Martins Mar 19 '16 at 14:02
  • 4
    You should use either :shell or <C-z> – romainl Mar 19 '16 at 14:35
  • This is the main selling point of neovim. I'd highly recommend giving that a shot to have a full shell without limitations (well some limitations but much less than :shell). :vsplit term://zsh is a pretty nice feature IMO. I just ran into a scripting problem around this which I could assist with (open terminal mode and insert into a nonmodifiable ) [some fun stuff..] – Dan Bradbury Mar 23 '16 at 16:05
  • Huh, took some time to answer... @AlexandreMartins vim 7.4, bash 4.3.42(1), Debian testing. full output – criztovyl May 14 '16 at 12:48
  • @romainl Will try that :) – criztovyl May 14 '16 at 12:48
  • @romainl My Umlaut issue is also there if I use :shell. – criztovyl May 14 '16 at 12:53
  • @statox I currently can't imagine a good situation but sometimes switching to an external shell breaks my workflow. But maybe my workflow is simply ugly ^^ – criztovyl May 14 '16 at 12:58
  • @DanBradbury What are the limitations of :shell? – criztovyl May 14 '16 at 12:59
  • @criztovyl_needs_help Your setup looks pretty standard. Can you clean your '.vimrc' to a smaill subset that still has the problem and paste it in the answer? Also mention your keyboard layout by executing 'cat /etc/default/keyboard'. Let's see if I can reproduce your problem this way. Let me also know which key conbinations do I have to press to get one of the characters you mention. – Alexandre Martins May 14 '16 at 13:24
  • 1
    @AlexandreMartins Huh, I'm using amix's vimrc. When removing it issue is gone, so I think it's a problem of amix's vimrc. Will open issue there :) – criztovyl May 14 '16 at 14:01
  • @criztovyl_needs_help: It's good if you found the cause of the problem. I think you might be interested in tmux it allows you to split your terminal in several panels, it could be useful to you to have a split containing Vim and another one where you'd issue your terminal commands. That really helped me improving my workflow. – statox May 14 '16 at 14:56
  • Good stuff @criztovyl_needs_help . Glad you managed to figure out how to solve your problem. If you end up figuring out the root cause as well, answer your own question and make someone else's life easier. You may even hog those lovely vi.stackexchange points for yourself. :D – Alexandre Martins May 14 '16 at 19:37
  • Redefining $LANG in the vimrc is a really bad idea. You use this environment variable to set your locale, which influences all sorts of things (which character encoding to use, sorting order, interface language, etc). I appreciate there are some edge-cases where resetting this is useful, but doing this habitually is not a good idea, and this is a great example why copying a random vimrc from GitHub is probably not a great idea... At any rate, you should probably post your answer as an answer − rather than an edit to the question − so people can see your problem is solved :-) – Martin Tournoij Jul 13 '16 at 21:19

1 Answers1

2

The Problem here is in the .vimrc I use, it overwrote my locale. So I commented that out and everything works fine again.

See the corresponding GitHub issue: amix/vimrc#204.

Thanks to @Carpetsmoker for pointing out an answer would be more sufficent than an edit of the question ^^

criztovyl
  • 151
  • 6