Is it possible to install the Vim-LaTeX suite in cmder? - vim

I use LaTeX (pdfLaTeX) and Vim quite often. I started with teXworks as a text editor for LaTeX, but since I found about the Vim-LaTeX suite I am trying to switch to Vim for everything.
However, I use cmder to run a bash shell in a windows computer, which comes with its own version of Vim installed, and I cannot manage to install the Vim-LaTeX suite on cmder.
First I download the folder, then extract it with 7-zip. I change the .vimrc as indicated in the website, and I check it is read when Vim starts. From here I have tried:
Pasting the files into the Vim74 folder in cmder/.../Vim/Vim74/ replacing the existing duplicates, restarting the terminal (Total disaster, Vim crashes).
Pasting the files into the Vim74 folder in cmder/.../Vim/Vim74/ without replacing the existing duplicates, restarting the terminal (Total disaster, Vim crashes, again).
Creating a ~/vimfiles/folder and putting the plugin on it (No effect).
I understand that installing a suite in cmder is different from doing it in windows or *nix systems, but I can't quite spot how to do it right.
Has anybody successfully installed the Vim-LaTeX suite in cmder? Is there any particular way of doing it?
Many thanks for your help!

Related

What should g:slimv_swank_cmd be to run SLIMV for SBCL on Windows 10?

I'm trying to use Steel Bank Common Lisp with GVim.
I installed Steel Bank Common Lisp (AMD64) into 'C:\Program Files\Steel Bank Common Lisp'.
I unzipped SLIMV into 'C:\vimfiles'
I installed Python3 and put it in Windows PATH.
I installed Python 2.7 and put it in Windows PATH.
I installed 64-bit GVim and finally got Python recognized.
I ran ':helptags C:/vimfiles/doc' in Vim to generate help tags for SLIMV
I have a 'Slimv' menu at the top of the Vim window but no Repl menu.
g:slimv_lisp = sbcl
g:slimv_impl = sbcl
g:slimv_preferred not set
g:slimv_lisp not set
g:slimv_swank_cmd not set
Per webpages and manual, I put this in my vimrc file
let g:slimv_swank_cmd = '!start "c:\Program Files\Steel Bank Common Lisp\sbcl.exe" -l "c:\Users\epic\vimfiles\slime\start-swank.lisp"'
I don't know if that's supposed to be 'set' instead of 'let'.
(start_swank) doesn't do anything inside SBCL.
I assume '!start' is a Vim command, the first thing passed is the location of SBCL on my computer, don't know what the '-l' does, and the third parameter is where SLIMV put 'start-swank.lisp'.
At this point, the Vim command ',c' will open a command window running SBCL and wait. Typing '(exit)' in SBCL will take me back to Vim with a red error message saying 'SWANK server is not running, Press ENTER to continue."
Any other documentation I can find is for SLIME, not SLIMV.
How can I get SLIMV running so I can use Vim for SBCL?
EDIT:
Thank you for the help as to what I'm telling to do what, romaini. Thanks for the slimv help, Tamas.
I have removed the g:slimv_swank_cmd entry in .vimrc, as I believe it does the same thing by itself that it would if I had the command right.
Now, I think I'm back to the problem I was trying to fix with that command, and that might be that SBCL is not working for me (?). Without the g:slimv_swank_cmd setting in .vimrc, Vim starts SBCL which then fails because COMPILE-FILE returns NIL when evaluating line 16 of start-swank.lisp. Vim will then report "SWANK server not running" while SBCL is at a debug screen asking whether to RETRY, CONTINUE, ABORT,,,, or EXIT.
Could it be that slimv is working well but SBCL is not working? I'm still trying in Vim to either compile a program (* 3.0 4.0), evaluate the line, or just connect-server ',C'.
EDIT2:
Trying to install a newer version of slimv from GitHub, I'm afraid we've hit the end of my capabilities. The Readme says to install the zip, reading the whole thing says see internal docs for more, and the internal docs say unzip the zip file in the vimfiles directory. There are lots of files on Github but I don't see a zip.
EDIT3:
With slimv-master.zip from github extracted to .vimfiles, I get the same error that "COMPILE-FILE returned NIL" while evaluating line 16 of ./slime/start-swank.lisp.
EDIT4:
Apparently, the SBCL download went from v2.2.0 to V2.2.1 since 01-26-22. I'm on a 64-bit Windows 10 machine and my SBCL download is automatic from SourceForge after clicking Windows-AMD64 here. I have the same issue, ./slime/swank/sbcl.lisp returns NIL from line 16 where COMPILE-FILE returns NIL. It is starting SBCL v2.2.1 now.
EDIT5:
Both my versions of slimv were extracted to ./vimfiles/. My ./vimfiles/slime/slime.el is Version 2.19. Did the newer slimv version not overwrite files when extracting to ./vimfiles/? Is there an uninstall when we're just extracting zips to ./vimfiles/?
EDIT6:
I don't have a check mark next to comments to mark the last of Tamas Kovacs' responses as the answer (as was the rest of his help through the comments). I now have a REPL window in Vim and Tamas solved my issue.
I summarize the results of our investigation (see comments above):
No need to set slimv option g:slimv_swank_cmd, because slimv should autodetect sbcl and build the correct start command for the swank server.
If autodetection fails or you want to make your own start command for any other reason, then you should use the --load switch (instead of -l) for loading a script into sbcl (the switch depends on the lisp implementation). On Windows machines I also suggest adding /MIN to the !start command, that would start the swank server minimized. This is an example start command for starting sbcl on Windows:
'!start /MIN "c:\Program Files\Steel Bank Common Lisp\sbcl.exe" --load "c:\Users\epic\vimfiles\slime\start-swank.lisp"'
Unfortunately vim.org has an outdated version of slimv, and recent changes in sbcl broke compatibility with the swank server contained in that slimv version. Therefore I strongly recommend that you download or checkout slimv directly from the github repository: https://github.com/kovisoft/slimv
When downloading the slimv-master.zip file from github and manually installing it, make sure that you extract the files from the zip to the proper subdirectories of the vimfiles folder of vim. This means that the contents of slimv-master\ftplugin should go into vimfiles\ftplugin, slimv-master\slime should go into vimfiles\slime, etc. In other words the slimv-master directory in the zip represents the vimfiles directory on your system. Of course this also holds when you install slimv by checking it out from github.

Yank command is not working in vim editor

I want to copy code from vi editor to clipboard so that I can paste it in the browser. I know the command gg"*yG and it's working when I open the code like vim code.py, but when I open like vi code.py, it doesn't work.
But normally when I type vi, it opens vim. I thought vi and vim are same command now, both referring to improved version of vi editor. Then why is this happening.
Summarizing from your comments, it seems like you have installed two versions of vim; one probably via your OS's installation procedures and one via homebrew.
vi is symlinked to the default installation, which was compiled without +clipboard, while vim would execute the binary from homebrew (because that's how your $PATH is configured), which with compiled with clipboard support.

Vim Latex Suite can't find latex command using Pathogen

Background
I was having dual boot issues with Windows 10 and Ubuntu 17.10, which eventually resulted in a boot loop and since I need Ubuntu 16.04.3 for an Operating Systems class I decided to load up an ISO into one of my USBs with Rufus, reformat my Windows partitions from GPT to NTFS to get around some nasty bootmg/efi issues and here we are, good as new, except for one thing...
Problem
The only thing I haven't been able to successfully reinstall has been Latex Suite for Vim. Installation last time had been an easy extraction into .vim, but after some deliberation I elected to use Pathogen.
I've installed Pathogen using
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Which works for color schemes, etc., and every other aspect of latex-suite save for compiling, generating this every time I try to compile (using \ll):
/bin/bash: latex: command not found
I installed texlive which does then allow me to compile using vim, but I'd prefer not to use this solution if I don't have to (in fact I've already removed it, its more of a plan b for now given it's obstructive and non-intuitive compilation errors). I looked at the other questions asking how to install Latex Suite through pathogen and didn't see anything else similar to what I'm working on; below is self-explanatory in regards to installation structure.
~/.vim/bundle$ ls
vim-archery vim-latex-1.10.0
Obvious running pdflatex and latex can't be found because they are not in my $PATH but I was under the impression that with a good, recommended package manager like Pathogen I wouldn't need to which is what originally raised the red flag for me as its whole job is to modify the runtime path. I thought maybe trying sudo vim text.tex might work in case there hadn't been adequate permissions for Pathogen to modify runtime path but no dice.
.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme archery
let g:tex_flavor='latex'
set sw=2

How to delete empty lines on visual studio code with the vim mode

I've been trying to delete many empty lines from a huge file. On other editors with vim, or vim itself, I could just do:
:%s/\n\n/\n/g
But neither if I use \r or \t it doesn't work. Seems like some vim features are missing on the editor. Is there any configuration to make that work or another way to do that?
To have advanced Vim functionality work within VScode, you can leverage its Neovim integration.
First, you'll have to install Neovim. For instructions, check out: https://github.com/neovim/neovim/wiki/Installing-Neovim
Then, adjust the following settings in your user configuration:
// Use neovim on backend. (only works for Ex commands right now). You should restart VScode after enable/disabling this for the changes to take effect. NOTE: Neovim must be installed (v0.2.0) and neovimPath must be set the executable in order for this setting to work. Otherwise, vscodevim will crash.
"vim.enableNeovim": true,
// Path to run neovim executable. For example, /usr/bin/nvim, or C:\Program Files\Neovim\bin\nvim.exe
"vim.neovimPath": "nvim",
Restart VScode. Now you can use Vim Ex commands, since the commands are sent to a headless Neovim instance that's running in the background. You can even use installed Vim plugin functions to a certain degree.

Vim74: E149 Sorry no help for help.txt

I just downloaded and installed vim74 on to my linux box. I'm only installing locally, for the user. When I go into vim, and do :help, I get the error.
I tried adding:
let $VIM='home/myuser/vim74'
let $VIMRUNTIME='home/myuser/vim74/runtime'
to my .vimrc but it didn't help. How can I fix this?
When building vim yourself and installing locally it seems that you need to generate the helptags manually from within vim since the build process doesn't seem to do it. I ran into this very same issue when building the latest vim version 8.0.311. I followed the link in Ben Klein's comment above, but both my &helpfile and &runtimepath were correct, yet I still received the E149 error when doing :help which I assume is your situation as well postelrich.
I found the helptags solution here:
https://github.com/Homebrew/homebrew-core/issues/1087
Even though I was installing vim locally on a centos system and not a mac, the issue seems to be universal. I just replaced $VIMRUNTIME with the path to the local vim runtime installed from make install, which in your case may be something like /home/myuser/vim74/runtime
Specifically I ran this from within vim:
:helptags ~/share/vim/vim80/doc
In your case you will probably run something like:
:helptags ~/vim74/runtime/doc
Once done, :help should immediately start working again without having to restart vim.
You can get the same “E149 Sorry no help for help.txt” error if you have a long-running Vim session and the Vim program files were upgraded in the meantime.
This happened to me: I had started an editing session in a GNU screen window on my Debian testing system using Vim 8.1. Some time later, unattenttended-upgrades upgraded Vim 8.1 to 8.2 with the result that the run-time paths were now no longer valid. I could have saved the session and restarted Vim, but it was simpler/easier to run the following command (specific to 8.2):
:set helpfile=/usr/share/vim/vim82/doc/help.txt

Resources