Remove indentation line in Jupyter Notebooks - jupyter-lab

I have a good chunk of code which I have pasted in a JupyterLab notebook.
And while in VS-Code it looks fine, here it the indentation is marked with a grey lines:
How to remove them without going line by line?

A quick hack: select all >> Tab >> Ctrl+[

Related

GHCI -- Prompt colours not working on windows

I am trying to set a custom prompt for GHCI on Windows, but the ANSI colours do not seem to be working.
I tried opening GHCI on CMD (and even in the new Windows Terminal app) and running
:set prompt "\ESC[101m\STX \ESC[m\STX"
which should just display 2 red spaces, but the colouring does not work. It just shows two black spaces.
It works without any problem on my linux distro, so the code should be fine?
Also, it works on Git Bash but not on the VS Code terminal, even if I set it to use Git Bash by default.
I don't even know where to look for a solution, as it could be a GHCI problem or a CMD problem or I'm just missing some package that I need on Windows?
I found a solution but it requires an extra \n after the prompt.
The following command shows it correctly.
:set prompt "\ESC[101m\STX >\ESC[m\STX\n"
One Trick that can be applied is to use a combination of \r \t characters for a fixed tab width.
:set prompt "\ESC[101m\STX >\ESC[m\STX\r\t"
I however could not find how to change the width of tab character in PowerShell or Windows Terminal.

How to issue Vim commands in command mode (`Enter` not working)

I installed neovim with pkg install neovim. I then downloaded the latest version of Nvim-R with curl -L "https://www.vim.org/scripts/download_script.php?src_id=26482" > NvimR.vmb. Finally, I opened the file with nvim NvimR.vmb.
Now I'm in the editor and I launch the command mode by pressing the : key on my keyboard. I then proceed to type packadd vimball into the command console. Finally I try to issue the packadd vimball command by hitting Enter on my keyboard and nothing happens. I look up in the editor panel and notice each time I hit Enter the cursor is just being moved around in the editor.
I don't want the cursor to move around in the editor. I want to issue my :packadd vimball command. How do I do this?
Everything I see in that gif is precisely what I would expect to see given what you typed.
You run :packadd vimballEnter—this does vim’s native packadd command (assuming nvim has that), and then returns you to the editing portion of the screen.
Subsequent Enter presses are equivalent to j—move down a line.
All of that said, I dont know of any packages named vimball, but I don’t really work with that format. Perhaps you’ve misunderstood a plugin’s usage or vimball usage? Ask about that stuff on vi.stackexchange.com: we probably have better vi/m experts there.

Problems opening Vim from the command line? (Windows 8)

How do you install Vim such that it runs in the command line?
I saw a post here and it said to make sure that
[✓] Create .bat files for command line use
was checked. I did make sure that it was checked, but vim won't open in the command line. However,
gvim
will open gvim from the command line, which is a pop-up window. How do I open Vim so that I can edit files directly from the command line? I think that I need to edit the PATH, but I don't know what that is or how to edit it.
EDIT: I also looked at this and followed the directions, tailored to my system. Now vimtutor will briefly open the vimtutor for less than a second and close it! But Vim still doesn't work. Gvim will open Gvim still.
EDIT: I don't think I was clear when I wrote my post. Running
vim
does not open Vim on my computer. Neither does
vim.exe
Use the bottom right Win8 gesture and go as following: Settings > PC Info > Advanced System Settings > Advanced > Environment Variables. Under system variables find Path in the list.
Path is just a semicolon separated list of directories. Append vim.exe to the list and it's now in your path.
You want to run vim.exe, not gvim.exe.
Add this to the Path under system variables "C:\Program Files\Vim\vim82" . Then you are all done.
To Edit Environment Variables:
Click on Start Menu -> Type Environment Variables and Press Enter Supporting Image -> In bottom Right Corner you will find "Environment Variables" Supporting Image -> Under System Variables Search for Path Supporting Image -> Double Click To Edit -> Click on new and Paste the file address given AboveSupporting Image
Now you're done. Test it just by writing vim in Command Prompt or Windows Terminal.

vimdiff immediately becomes stopped job, crashes terminal when I try to fg it, but works with GUI

SOLVED: the problem was this line in my .vimrc:
set shell=/bin/bash\ -li
UPDATE: it appears the problem is due to my .vimrc (renaming the .vimrc to 'hide' it fixed the problem), so it probably has nothing to do with Mint.
I'm running Linux Mint 17 Cinnamon. When I run vim -d file otherversion in the terminal, I get a blank screen with
"otherversion" 18L, 218C
[1]+ Stopped vim -d file otherversion
user#machine:~/path/to/directory$ ;2R
If I do fg 1 that terminal window just closes. Also, there's no blinking cursor, though I am able to type. Same with vimdiff instead of vim -d. I've tried multiple distributions of vim, some that include the GUI, some that don't.
However, with versions that do include the GUI, if I run vim -d -g file otherversion, it works as expected.
I'd rather not depend on gvim to use vimdiff.
Any advice?
Thanks
If you need an interactive bash shell (to get your bash aliases for instance), use this code in your .vimrc instead of removing the option:
if &diff == 'nodiff'
set shellcmdflag=-ic
endif
This will only enable the interactive bash shell when not running vimdiff, so that you will have you bash aliases when running vim.
After removing the following line from my .vimrc, the problem went away:
set shell=/bin/bash\ -li
Thanks to comment from #FDinoff, the same problem at my end got solved.
The problem was "bash" command in my ~/.cshrc.
I had put that to avoid entering into bash every time after login. It was working fine until this issue started coming whenever I used to open vimdiff.
Removing ~/.vimrc didn't help me either. Then I read comment from FDinoff. There, he suggested that it could be related to shell, if "less" and "man" have also stopped working. I observed the same issue in my case, that helped me rule out the corruption in .vimrc.
After removing "bash" from my ~/.cshrc, the problem went away completely.

Use vim as command line tool?

is there a way to use vim as a command line tool? What I mean is, use it from the console (without opening a ncurses window) to run vim commands on file and save them. I need this because I usually run through all my files and do 'gg=G' to auto indent them.
Thanks
Here are listed two different ways to do that:
by using vim -s file-containing-commands file-to-edit
by using vim file "+:firstcommand" "+:secondcommand" ...
The first solution needs a file to be written beforehands; the second solution will launch vim and execute the commands, without leaving vim; you'll have to do that yourself, for instance adding a last command '+:x'

Resources