How can I change the newline code for fish shell - bash

I'm using windows 10 and installed cmder, using the fish shell with omf Theme fishface.
But every new row, it will show a new row Mark as this picture. Screenshot for new row mark
How can I get rid of this mark?
** didn't work if I change to another theme too.
Additional information without cmder.
Screenshot with cmd.exe + bash + fish

You can't disable that feature. The fish shell uses a heuristic (inherited from zsh) to determine if the output of the preceding command ended with a newline. If it doesn't it displays the Unicode U+23CE symbol (what you're seeing) or a tilde. Search the code for the symbol PROMPT_SP. Commit 58347d49 that I wrote and merged 2016-12-23 fixed that behavior for the Windows ConEmu terminal emulator. See issue 789. Based on your problem description it appears that heuristic does not work correctly in the cmder terminal. This probably means that terminal emulator has a bug since it doesn't behave like nearly all the terminals that fish runs on. Feel free to open an issue

Related

unwanted symbol appearing in integrated terminal in vs code

I'm using an embedded terminal in VS code for windows, but using zsh provided by babun as the shell.
I've also configured the prompt in the windows terminal app a little bit.
For some reason, the terminal app shows the prompt how I expect it to look:
terminal on windows
but the integrated terminal shows me a '%' symbol above each line:
integrated terminal in vs code
I'm still fairly new to customizing shells and have not been able to find a solution looking online, or playing around with the theme file myself.
I was hoping someone could look at my theme file below and help me understand what the possible offender for the '%' symbol could by could be:
modified babun.zsh-theme
I modified lines 4 and 10, to show the whole path in line 4 and show no path in line 10. The originals are commented out.

Scrolling up one line in bash, when opened via the PyCharm IDE

PyCharm offers the option to use the bash terminal (see File->Setting, where this screen comes up:)
Now when I have the bash terminal open while coding in PyCharm, like so
and want to scroll up line by line with the keyboard (in this case to view line by line the output of the previous command, pytest, that I ran that output the error message), I can't, no combination of Ctrl, Sift, Alt, Super, Up, Page Up will work (only Shift+Page Up scrolls up - but by a whole page, not a line, which is too much).
I'm not sure, is this because of bash or because of Pycharm (I'm using Ubuntu (16.04), if that matters).
This issue is really driving me nuts!

How to get colourful integrated terminal ("cmd") in VS Code

Recently after updating my VS Code I saw the following image in the Release Notes (in the Split terminal feature section)
I can't figure out a way to add such Syntax Highlighting in my terminal. Obviously, this is bash in the integrated terminal. Well, I'm using Command prompt and I don't seem to find any satisfying answer for getting colored text on my terminal (that does not mean just foreground or background color). Mine looks like...
Is there a way to fill this dull terminal with interesting text colors.
The upper one is the output of something called "node"
the second one is your terminal
so the first one is an outputstream of e.g. an program which formats stuff a bit else, also is output of an program in a terminal displayed differently than just the shell
and now to your question, the shell inside vscode has the same theme like your standard shell
so windows -> cmd, ubuntu bash, ...

Vim under mac does not behave as expected

I recently got a mac. I was previously working on a laptop with ubuntu and I was using vim.
I now will discuss about vim in console (iTerm2 or the default terminal) and macvim.
The problem is that some binding don't work under mac. For example I had CTRL left/right for navigating between splits, CTRL up/down to move lines or blocks of code up and down, etc. They don't work anymore.
I had a bunch of plugins (nerdtree, powerline, etc.) that now look weird. Powerline doesn't display special characters in macvim and in terminal they are question marks.
In console, nerdtree looks weird and it doesn't display the special triangle character. If I hit return to open a file selected from nerdtree, it doesn't do anything. In macvim, it works ok.
Is there any guide on how to use vim on mac? Or what is the recommended way?
Nerdtree : let g:NERDTreeDirArrows=0
Powerline : Take a look at the part of strange characters in the document https://github.com/Lokaltog/vim-powerline
Navigating within splits with Ctrl + arrows work on mine. Can you post your vimrc, or try running vim without any configuration.
Ctrl+arrows to move lines and block doesn't work on mine.
Did you check which key was sent by your terminal to vim ?
Did you tried to set it manually ?
I had similar problems with emacs, including one keybinding I'm still not able to reproduce :(
I have the exact same config on my Mac and a Windows box at work, my Ubuntu box at home and a couple of VPSes. It works exactly the same on every platform in GVim/MacVim or in plain Vim.
Unfortunately I don't use either NERDTree nor Powerline but Vdt's answer seems to have all the info needed.
Some of the behaviors you describe are custom mappings. You should show us your ~/.vimrc (the old one on linux and the new one on the Mac, if there are differences) so that we can help you make it more portable.
Also, "looks weird" means nothing: please add a screenshot or two.

How to get Cmd-left/right working with iTerm2 and Vim (without requiring .vimrc changes)?

I want to be able to use Option-left and Option-right to skip words (and Cmd-left/right to go to beginning and end of lines) within Vim as it does at my shell prompt. My Iterm2 preferences have mappings to do this (e.g. Option-left to Esc-H and a one for option-right to Esc-F to skip over words), and this works in the shell locally or when ssh'd to a remote server.
When I use Vim locally or remotely, option-left works, but option-right does not. I suspect this is because Vim naturally listens for Esc-H, but not Esc-F. I am able to get around this by modifying .vimrc file to Esc-b to b and Esc-f to f, but I don't want to do this to every server I'm connecting to.
Similarly, I have the same desired setup for Cmd-left/right for going to beginning and end of a line. I can get this working in the shell via Iterm2 mappings (e.g. Cmd-left to Esc-[h), but Vim doesn't respond at all to this unless I map keys again (e.g. Esc-[h to ^).
Update: I just figured out how to get option-left/right working. I changed mapping in iTerm2 for these to be escape-[1;5D and escape-[1;5C respectively. I still want to solve the Cmd-left/right problem though (I changed my question's title to reflect this). Any ideas?
To mimic OS X's behavior of sending Cmd-left/right to the beginning/end of a line, I add the following mappings in iTerm2:
Cmd-left to escape-sequence [1~
Cmd-right to escape-sequence [4~
To mimic OS X's behavior of sending Option-left/right to the previous/next word, I add the following mappings in iTerm2:
Option-left to escape-sequence [1;5D
Option-right to escape-sequence [1;5C
Special thanks to this blog post for tracking down what I was missing with the cmd-left/right mappings
I'm using iTerm2 3.4.2 and there's actually a preset that you can select for your profile that enables this.
FWIW, dolan's answer didn't work for me on iTerm 2 1.0.0.20120203 on Mac OS X 10.7.3. His solution only inserted ~ and 5D/5C into my terminal when I pressed the shortcut keys.
Instead, I used the following solutions:
Cmd-left/right:
iTerm 2: How to set keyboard shortcuts to jump to beginning/end of line?
Option-left/right as well as option-delete:
http://hackaddict.blogspot.co.at/2007/07/skip-to-next-or-previous-word-in-iterm.html
YMMV, not sure why one set of solutions would work and not the other
I don't have MacOS, so I cannot exactly know your situation, but I recognize the problem from other OSes.
Basically, it would mean that the terminal sends keycodes that aren't understood by vim. I fixed it in the past by doing
TERM=something
export TERM
before invoking vim
E.g. in order to get all keys and syntax highlighting working on AIX 5.3 across Putty/screen, I needed to use
TERM=iris-ansi vim
There is a list of builtin terminal types if you pass a bad TERM

Resources