vertical split for CTRL-W_CTRL-F
For the new window created by `CTRL-W_CTRL-F`, is there some way to configure vim to do a vertical split rather than a horizontal split?
https://redd.it/1am99qs
@r_vim
Where to get errorformats?
Hello all.
I have been using Vim for several years now, but the thing I always struggled with was errorformat. Is there any place where I can copy error formats that somebody else figured out before and kept up to date?
I have followed previous advices that teel to copy from syntastic or vim-makecfg, but they seem to be severily outdated and don't work correctly.
Any up to date sources from erroformat out there?
Best regards.
https://redd.it/1am29qk
@r_vim
Pi symbol snippet (UltiSnips) problem
I have this snippet for the Pi symbol (along with other Greek letters) in LaTeX documents:
```
## pi symbol
context "math()"
snippet pi "Greek pi" w
\pi$0
endsnippet
```
And my problem is that when I try to tab out of it, it places another slash instead of escaping. For example, this what I have after typeing `pi` inside the curly braces for `frac` and my cursor (I am displaying here as "|") is just after the letter "i" in "pi".
```
\[
\frac{\pi|}{}
\]
````
Now when I press `<Tab>`, I get this:
```
\[
\frac{\\pi|}{}
\]
````
And if I keep pressing, I keep getting more of those instead of escaping the braces:
```
\[
\frac{\\\\\pi|}{}
\]
````
Only after I add some white space and press `<Tab>` again that I get to escape the braces. This happens almost regardless of my trigger options. I tried it with `i`, `w`, `A`, `b`, etc. And regardless of which env or generally any place I am in my document.
What to do?
https://redd.it/1alsxhs
@r_vim
How do I fix the color scheme?
I'm discovering how vim-plug works and I imported the dracula color scheme, but it comes out with a solid background, how do I make it transparent? And how do I even modify any of the colors, I am new to nvim themes and plugins.
https://preview.redd.it/7x0lgdh2z7hc1.png?width=941&format=png&auto=webp&s=53a3d3faad7853463b79aa80a3ac94ebb3e328c3
https://redd.it/1alc7jo
@r_vim
solv-sh :: Soulver-like Bash Script designed for Vim
Although this is a Bash Script I wrote it deliberately to give myself a Soulver-like experience in my Vim notes system so I hope it's okay to post here:
- https://github.com/shuckster/solv-sh
Essentially it tries to strip anything from its input that would upset bc
and uses that to find an answer to each line:
a simple sum 1 + 1 #= 2
let us multiply that result LINE:-1 3 #= 6
and sum the previous lines SUM:-2,-1 #= 8
as a percentage demo 2 - 1 as % of LINE:+2 #= 3.90625
percent off demo (5 2) % off 512 #= 460.8
percent of demo 10 % of 256 #= 25.6
Answers appear to the right of the #=
and will be stripped and recalculated if you send the script a sequence of lines that already include them.
Different to Soulver, I opted to use relative line-numbers for the LINE: and SUM: tokens to make things more natural to the Vim experience: So LINE:+5
means replace that token with the answer calculated 5 lines ahead, and SUM:-3,-1
means replace that token with the sum of the previous 3 lines.
As you can see, it permits arbitrary strings before expressions (and after too) so you can annotate them, but it's not very clever so don't expect it to do the right thing with a bunch of punctuation.
Hope others find it useful!
https://redd.it/1akmg8z
@r_vim
Is it normal that the ',' command operates much slower than the ';'
Hello everyone,
I am new to vim and practice on very small files at the moment in my free time. Today I found out that for the exact same search the ';' command to find the next occurrence of the last search operates quasi instantaneously but if I then want to go back one result with ',' it takes what feels an eternity. Is this a configuration issue or normal? Why would it take so much longer to go 1 word or whatever back than forward?
Thanks already for your help!
https://redd.it/1akekce
@r_vim
How to spot a vim user
​
https://preview.redd.it/vj5x67mknxgc1.png?width=1708&format=png&auto=webp&s=be3f916a610cfa082e9c6dacb0373256c814310d
https://redd.it/1ak5tjf
@r_vim
Server for web development
Can someone suggest a good development server for web development.
I currently use "live-server" but it does not show the css file changes automatically. Every time I change some css code it will need to be again launched
https://redd.it/1ajfhzd
@r_vim
Auto complete quotes, brackets, etc.
How do I get vim to auto complete for me quotes, brackets, parenthesis, and such things? I would like to, for example, type [
, and get []
with my cursor inside and ready to type. Then, type a quote "
, and get a ""
with my cursor inside and ready to type, etc.
I also want to be able to visually select a work/phrase/line and apply stuff to it -- say quotes or brackets, etc.
I tried getting this done using Ultisnippets like so:
snippet " "Faster strings" A
"$1"$0
endsnippet
How do I fix the colors on the MacOS default terminal?
https://redd.it/1ajecer
@r_vim
Vim newbie is stuck once again...
Greetings,
I fear I am stuck again.
​
Problem 1:
The following is displayed in the commanline area whenever I use vim to open a .tex file: "VimTeX: latexrun is not executable!". I have checked various sources in which the same error message was displayed, for example the following:
**https://www.reddit.com/r/LaTeX/comments/xtms2k/nvim\_vimtex\_latexrun\_is\_not\_executable/**
and
**https://github.com/lervag/vimtex/issues/1420**
​
but either didn't really understand them or these fixes didn't really work when I treid to implement them. In the reddit post linked above there was a comment linking a git repository which I was not able to follow quite well. Additionally since I am using vim (micvim) and not neovim I was unsure what exactly needed to be done in my case. I would greatly appreciate any help on this topic. Seeing as I am a newbie at this I would also appreciate if the instructions were rather clear in exactly needs to be done (to avoid messing more things up ig). I have included my .vimrc if that is of any use.
https://preview.redd.it/c4f3bys30lgc1.png?width=843&format=png&auto=webp&s=aa36435671dbd461bbdabbe4aa0908ecd466161a
​
Problem 2:
Whenever I convert a .tex file to .pdf I am given a .log file aswell. Is this normal / should I be keeping it in my folders? If not is there a way to ensure it not even be created ehenver I use the command to convert?
​
Any help is greatly appreciated!
https://redd.it/1aiphpe
@r_vim
Automatically change theme?
I have a theme script that has, till now, simply put a new theme in my config using sed
.
Trouble is... I usually have multiple instances running, changing each manually is a chore.
Is there a way to automatically update themes on all running instances?
https://redd.it/1aihqii
@r_vim
accessing macos’s ~/library
i would like to use vim to create and edit files in my obsidian vault, which is kept in icloud drive for purposes of syncing across my devices.
The folders relevant to icloud drive are in macos’s ~/library/mobile documents directory. using nerdtree i am not able to enter that directory.
is there a way?
https://redd.it/1ahy6kn
@r_vim
vim as a necessity
I've been learning vim for a month or two now and enjoy modeful editing and its shortcuts. But, I've found the learning curve to be steep and though I can jump through single files with ease, I find more advanced things like copy-paste, find and replace a word much slower than with using a mouse.
My motivation for learning vim is it seems pretty essential for writing software on bare metal platforms. But, I recently found out about rsync (or any transfer tool), so my reasoning is that if the platform I'm writing / running code on is powerful enough to rsync large file directories efficiently, I can just use my home editor configuration.
So, are there other any advantages to using vim outside of this and a decent increase in speed over using a keyboard and mouse? My guess would be not really, because everything else (search, etc) can be done through the unix shell
Sorry in advance if this question is heretical
https://redd.it/1ahafpe
@r_vim
Macvim newbie stuck...
Greetings,
from the title you already know that I am a newbie when it comes to vim (in my case macvim).
My goal: Use vim as a LaTeX editor probably through console for taking notes during lectures and creating LaTeX documents in general. (Using VimTex, plug-vim ,and Zathura)...
Context: I have Installed macvim, basictex (for pdflatex), and a bunch of other things. Vimrc is kinda set up accordingly.
Problem: When I check to see if VimTeX is even loaded, by running this command inside vim: ':h vimtex-requirements', it returns an error ("E149: Sorry, no help for vimtex-requirements"). Now after having tried a bunch of things and having read through the ':help packages' and a multitude of other manuals I fear I am stuck. My diagnosis is that the plug manager is not loading vimtex when starting vim.
Is there something I forgot to install? Something wrong in my .vimrc?
I would greatly appreciate any help on this matter. Seeing as I am a newbie I would ask of you to be rather precise with the solutions as I am still a newbie and don't want to mess more suff up....
https://preview.redd.it/n6bw3vt6h6gc1.png?width=734&format=png&auto=webp&s=eb6a63f2ba9d925959ca3aa6b764ee571478ff91
https://redd.it/1ah4881
@r_vim
Experiences on using an alternative (non-qwerty) keyboard layout in vim?
Curious on anyone's experiences with using an alternative (non-qwerty) keyboard layout, particularly for those who also continue to use the qwerty keyboard layout and stick to the default bindings for the most part. I got a split column-staggered keyboard (Glove80) for my desktop and find that I cannot give up using index key for "c" (I refuse to believe it's the most ergonomic). There's some workarounds like shifting the bottom row by 1 key but they just introduce more problems.
I think the best solution is to learn a new alternative layout alongside learning the Glove80 because from what I've read, people tend to struggle switching between a columnar/ortho keyboard and a staggered layout if they stick to the same layout on both since they are too similar (e.g. adapting to using the middle finger for "c" for the former and the index finger for the latter) means you will likely always stumble for a few minutes every time you switch between the keyboards.
However, using vim with different bindings between machines is even more work, so I'm curious--is the ideal solution to map all the qwerty bindings to the same positions on the alternative layout (e.g. hjkl on qwerty is the same key position on a different layout)? Or perhaps just the most commonly used ones?
Or is it really better to just use the same layout regardless of keyboards and accept that perhaps fumbling with some keys like "c" is just inevitable every time you switch? For me, the cost of learning a new layout is low because the best time to learn is picking up a new keyboard that needs to be learned as well. I'm just interested in the best approach to ensure using and switching frequently between both a Glove80 and the default bindings with a qwerty layout on a laptop is a smooth experience.
https://redd.it/1ama527
@r_vim
Useful key mappings on OSX
Hi, I understand that mappings are individual preference but still ask some question about it. I am new to vim, stared vim VS Code plugin, and I'd like to use Karabiner to map some keys. I wonder how often do you need to use "control key" in vim environment (as well as terminal or other tools). Is it worth to remap it? My idea for the start is:
Caps Lock click into Escape, Caps Lock hold into Control
or
Caps Lock click into Escape, Caps Lock hold + hjkl into arrow keys
What do you think is more useful? And do you have any favorite mappings that you use and can recommend for a new vim user?
Cheers!
https://redd.it/1am1go5
@r_vim
Jupyter notebook opening in macvim
hello pros,
I'm new to vim and I noticed that when I run jupyter notebook on the terminal it opens up a window in macvim with link to my jupyter notebook and the URL. The link is not clickable, therefore I have to copy and paste the url into my safari.
I have looked but found no answer
I think I found a solution which is to go into jupyter notebook config using vim \~/.jupyter/jupyter_notebook_confit_py.
and have updated from c.NotebookApp.browser = ' ' to
c.NotebookApp.browser = u '/usr/bin/open -a Safari %s' (found it online)
but still does not open in safari. Is it the directory of my safari that is wrong? (as you can see I'm totally new to this) I reached out to my Teaching Assistants in school and they just told me I would have to keep copying and pasting URL from macvim every time I want to access my jupyter notebook.
Are there no other way to fix this? or make it so that the link is clickable in macvim?
Also, I would appreciate any tips about configuring my setting to what most people use (to make their life easier)
on a side note, jupyter notebook does the same (opens terminal-> macvim with long URL and unclickable link) when I click launch from anaconda. if this helps with anything.
https://redd.it/1alndic
@r_vim
Settings not changing in Surfingkeys for Chrome
Sorry to ask this here, but my issue has not gotten any reply on GitHub.
I just started using it, and it is not loading my basic configurations. It tells me it has saved it, but the key mappings do not change.
>file:///C:/Users/varit/OneDrive/Desktop/configs/Surfingkeys.js
I pasted the above file path into the Load Settings from the text area and turned on the "Allow access to file URLs".
// an example to create a new mapping \\
// an example to create a new mapping ctrl-y
api.mapkey('<ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// An example to replace T
with gt
, click Default mappings
to see how T
works.
api.map('gt', 'T');
// an example to remove mapkey Ctrl-h
api.unmap('<Ctrl-h>');
// set theme
settings.theme = {
'font-family': 'Consolas NF, Charcoal, sans-serif',
'font-size': '20pt',
'background': '#24272e',
'color': '#abb2bf'
};
settings.theme'tbody' = {
'color': '#fff'
};
settings.theme'input' = {
'color': '#d0d0d0'
};
settings.theme'.url' = {
'color': '#61afef'
};
settings.theme'.annotation' = {
'color': '#56b6c2'
};
settings.theme'.omnibar_highlight' = {
'color': '#528bff'
};
settings.theme'.omnibar_timestamp' = {
'color': '#e5c07b'
};
settings.theme'.omnibar_visitcount' = {
'color': '#98c379'
};
settings.theme'#sk_omnibarSearchResult ul li:nth-child(odd)' = {
'background': '#303030'
};
settings.theme'#sk_omnibarSearchResult ul li.focused' = {
'background': '#3e4452'
};
settings.theme'#sk_status, #sk_find' = {
'font-size': '20pt'
};
// click Save
button to make above settings take effect.
I am trying to unmap Ctrl h so that I can use it go to history.
Also ctrl y does not do any thing. Ctrl h just toggles the links that f does
I have also enabled the option "Allow access to file URLs"
I have also disabled all other extensions and it still is not working.
I have also tried copying and pasting my settings manually after removing the file path from the Load settings from the text area.
https://redd.it/1ako6hx
@r_vim
Is vim-polyglot outdated?
I'm noticing that a lot of the semantic highlighting plugins that are loaded by vim-polyglot haven't been updated in years, and some have. Is there a better alternative, or is Vim ever planning on natively supporting more semantic highlighting without plugins? I'm using regular Vim, not Neovim, and no plans on switching.
https://redd.it/1akkbka
@r_vim
Anything like foambubble for nvim or something similar which would be helpful for uni
https://github.com/foambubble/foam?tab=readme-ov-file
https://redd.it/1akfjtm
@r_vim
Is there a way to get git status in the tab?
I've set my tabline to always show. By default it conveniently shows '+' when a file is modified which goes away when I write the file. I'm wondering if there's a way to get the git status of the file into the tab? I'm just looking for 'M' for modified and 'A' for in the index, and nothing otherwise (I believe this is basically what vscode does).
https://redd.it/1ajyr8k
@r_vim
Auto complete quotes, brackets, etc.
How do I get vim to auto complete for me quotes, brackets, parenthesis, and such things? I would like to, for example, type [
, and get []
with my cursor inside and ready to type. Then, type a quote "
, and get a ""
with my cursor inside and ready to type, etc.
I also want to be able to visually select a work/phrase/line and apply stuff to it -- say quotes or brackets, etc.
I tried getting this done using Ultisnippets like so:
snippet " "Faster strings" A
"$1"$0
endsnippet
Anyone using Kottlin and Android Jetpack with Vim and CLI? Any tips?
Hello everyone,
I have developed a few Android apps using React Native in Vim to great results. No complaints. But I'm starting a new smallish Android project and I'm planing on finally scratching the itch of trying Kotlin. I also plan to use Android Jetpack, since it allows me to use Compose to create UIs using just code, since I abhor WYSIWYG UI editors like the one included in Android Studio.
Anyone tried this kind of setup? Can you give me any tips or point me to some good resources for this setup?
Thank you.
P.S. - Please refrain from suggesting "just use Android Studio" or repeating the "right tool for the right job" mantra.
https://redd.it/1ajfkyu
@r_vim
Is there a way to go back to a recent, but not directly previous, word?
A scenario that often comes up for me is that I'm writing an extended line and then realize that something needs to be changed about 10-12 words ago.
The simplest answer is using b
to travel back one word at a time until I reach the word, but that's obviously inefficient. I know that you can prefix b
with a number to go back n words, but I suppose the problem there is that the amount of words needed to travel backwards isn't always easy to immediately see, and counting words would occasionally take longer than just hitting b
a bunch.
I do occasionally use /
to search for the next word in a section and then Enter
to go to it, but I haven't been able to find a way to quickly do that backwards. Plus, it's not always the most efficient answer.
https://redd.it/1aj7w5k
@r_vim
A horror movie themed colorscheme for vim
Enjoy
https://github.com/ShinyNeonCalvin/VimHorror
https://redd.it/1aim3pk
@r_vim
Tmux formatting help
Couldn't post on r/tmux so that's why I'm here.
I just want to know how to get rid of the " " enclosing around the window-status icons. I've drawn some arrows to show what I mean. I am using the tmux-nerd-font-window-name which is why they are icons and not window names. Really small thing but it bothers me, thanks in advance!
image: https://imgur.com/a/MLeIEcz
https://redd.it/1ai0pk4
@r_vim
Noob question for understanding and my own sanity
Hi everyone,
I recently started to dip my toes into vim and have today encountered some behavior that I cannot explain but would like to understand.
So, I have 5 lines with let's say numbers 1-5 on the respective line. Now I place my cursor on 1 and do the following: v4j - dd with the result of deleting all 5 lines and leaving one blank line behind. So far so good.
Now, if instead I execute: v4j - :'<,'>norm dd it leaves line 2 behind.
Can anyone explain me why?
Thanks already!
https://redd.it/1ah46wk
@r_vim
Vim.org account administrator?
Hey, who is now responsible for the accounts on vim.org ?
I uploaded a script more than 10 years ago and I wanted to upload a newer version. However there is no way to retrieve my password. Could not find password reset option. It says to ask Bram. However we know this is no longer possible.
Anyone knows anything?
Thanks!
https://redd.it/1ah15e4
@r_vim