r_vim | Unsorted

Telegram-канал r_vim - r_vim

-

@r_channels

Subscribe to a channel

r_vim

Can anyone tell me me if this is a good nvim setup or do i need to change it ?

Here is the config - https://github.com/DarknetRises/noob-neovim-config

Here is my dashboard

https://redd.it/1as265u
@r_vim

Читать полностью…

r_vim

Remapping hjkl to jkl; respectively. Bad idea?

Hey guys, to keep it short, sweet, and simple, I am a comfortable vim motions user (mainly vscode) and have been using the default hjkl ever since I've learnt vim motions (x < 1 yr ago). I recently got a new keyboard and incorporated home row mods to it and learnt how to type correctly (I do not look at the keyboard anymore). Before I was typing incorrectly. However, it has been very uncomfortable to vim because I continuously press the wrong buttons because my resting fingers are in hjkl.

Should I just push through it as I did when learning to type or would it be a viable solution to remap my bindings. Also, is this a common question to ask? Just curious. Thanks in advance guys!

https://redd.it/1arpyof
@r_vim

Читать полностью…

r_vim

This is Madness !

https://github.com/tombh/novim-mode

&#x200B;

>Some, indeed many, may say this is counter-productive or even sacrilegious. But Vim is a lot more than just a keybinding paradigm; firstly it has one of the richest plugin ecosystems of any editor, but also it is a -if not the most- ubiquitous text editor that's been battle tested for over 25 years. There are more reasons to use it than merely its famous shortcut vocabulary.

&#x200B;

https://preview.redd.it/u1zbnnk4hqic1.jpg?width=512&amp;format=pjpg&amp;auto=webp&amp;s=908208c155b82edd47aaff10e309d4e7dea4534d

Just wanted to share. I find it very interesting that Vim's ecosystem is so great that the, by far, primary factor driving most of its users to use this editor and in the same way making everyone else so reluctant to do so still feels worth the work to remove it to some people just in order to access its other features :). Shows what a gem this piece of software really is.

https://redd.it/1ardao4
@r_vim

Читать полностью…

r_vim

vi remap backtip

Is it possible to remap backtick (`)in vi ( not in vim ) ? I don't have it on my keyboard ( i don't use a us keyboard but an italian one ) and every time doing backtick is boring expecially not in insertmode.

I am referring to vi, not in vim because for a work i am using vi on old systems . Till now i have always used windowskey+space and switched the keyboard to us but i was thinking if it was possible to map .

https://redd.it/1aqzq3z
@r_vim

Читать полностью…

r_vim

Can I use Netrw as a dialog to save buffer I am editing?

I assume every text editor has this feature, usually it's accessed with "Save As..." option of the window menu in other editors.

Say I have opened a new buffer with :new. I have made some changes and now I want to save them to a new file. But I don't want to use :write or :save because I want to save it in a directory outside of Vim's current working directory and I don't want to type the full path on the command line. I simply may not know my directory structure that well. I'd like to have a dialog, where I traverse directories, starting with current directory, and when I find the right one and confirm, I'd like netrw to ask me for the filename.

What's Vim's way to do it without third party plugins?

https://redd.it/1aqnxf0
@r_vim

Читать полностью…

r_vim

Coc and quickfix

I have a problem I imagine it can be solved in may ways, but I'm struggling with a good solution.

As an example, I have a source code (C) that COC can detect errors and show ">>" in the signcolumn; but as we all know COC uses its on location list (not a quickfix list). It uses clangd as lint.

Unfortunately, me and my team workflow use gcc and the error output to file errors.err, and then load the quickfix either with vim -q or with :cf;

Coc ignores this list of errors and do not show any ">>" at signcolumn

I wonder how can I unify both lists (coc list and quickfix list) to be able to see all errors highlighted, and also to be able to use the shortcuts.

The shortcuts are another mess: unimpaired plugin gives [q and ]q to navigate in the quickfix error list, and that works, although the errors are kept without any highlighting from COC, like if the line is perfec.

And the COC shortcuts (varies but usually [gand ]g) work only jumping within the COC list.

The first attempt, to make clang also report all errors gcc detect, is not a viable option. GCC have many different args set in the makefile, and they also handle includes in different ways; so this is not an option.

Another option I researched is to use coc-settings.json and add the option "coc.preferences.useQuickfixForLocations": true , but this is not working as expected.

Since I removed ALE plugin that handled that before, now I'm trying to configure COC to handle that alone and I believe it is achievable; I just don't know yet how.

Thanks for any help in the matter!

https://redd.it/1aq4xh0
@r_vim

Читать полностью…

r_vim

Is that normal selection in vim ?

https://redd.it/1apo5xb
@r_vim

Читать полностью…

r_vim

Unexpected / remapped to :

Hi all,
I’m puzzled by this. I have been using Vim for years.

Last week in one of my machines when y press the slash key near the keypad vim inputs “:”
The other “/” key works as expected.

I'm using the Spanish layout and I haven't touch anything in vimrc recently and the key works as expected in other programs. It happens on local and ssh terminals. Any hint is welcome.

https://redd.it/1ap99dh
@r_vim

Читать полностью…

r_vim

Repost from nvim Sharing some cool(imo) :reg configurations

I particularly like the default behavior of the d, c commands regarding the registers. If you don't know already, whenever you press any delete command(e.g: dd) you get the registers 1-9 to cycle the values of all the previous deletes. This is very useful because you can easily navigate to previously deleted text and yank it. I thought it would be convenient to mangle y commands in this cycle as well, as I catch myself searching for old yanks sometimes. Without further ado, here is the code:

function! CycleReg()
"make it trigger only on yank and not on delete
if v:event.operator == 'y'
let @9 = @8
let @8 = @7
let @7 = @6
let @6 = @5
let @5 = @4
let @4 = @3
let @3 = @2
let @2 = @1
let @1 = @0
endif
endfunction
autocmd TextYankPost * call CycleReg()


https://redd.it/1ap2s64
@r_vim

Читать полностью…

r_vim

VScode Vim goto definition in split view

As the title says, I'm using vscode vim on mac. I can't find the way to do this. My current way to do it is `cmd+\\` and then `gd` but the new tab will open two more tab because if I split screen with the same file, then gd will open another tab


I appreciate some help

https://redd.it/1anofbq
@r_vim

Читать полностью…

r_vim

Is there any gui for vim other than gvim?

Recently, I found that terminal emulation of gvim is slower than vim in terminal and neovide, which is gui for nvim.

I assume the terminal emulation itself is not the problem since vim in terminal and neovide worked as I expected. Thus, gvim is responsible for slowness.

So, the question is are there any gui for vim other than gvim?

Or can I use nvim's gui for vim?

https://redd.it/1anis22
@r_vim

Читать полностью…

r_vim

Why are people still using vim instead of neovim?

The development of neovim seems to be getting much more focus from more developers (even Apple), so I am wondering why anyone would choose vim over neovim.

https://redd.it/1amyg76
@r_vim

Читать полностью…

r_vim

How many times have you changed your vim config...?

Just wondering

https://redd.it/1amoelf
@r_vim

Читать полностью…

r_vim

VIM tips & Trivia 1

Did you know that vi & vim actually sits up top a good old fashioned line editor? That editor is none other than ex. This, of course, explains all those : commands...but did you know that the ex editor is fully functional (and enhanced) in vim?

It's true. Have a look at the vim help system (:help ex-cmd-index) for a comprehensive list. You can edit exclusively in ex mode if you want...

https://redd.it/1amk30t
@r_vim

Читать полностью…

r_vim

Strange vim/foot terminal interaction (characters pasted upon opening file)

I’m aware that Vim ‘interrogates’ the terminal upon launch, but I can’t help but wonder if, perhaps, escape sequences are being misinterpreted as vim commands under specific circumstances. I described the issue and included a 45-second video here: https://codeberg.org/dnkl/foot/issues/1604

Essentially, previously yanked/deleted text in another vim session is pasted on launch of another session (sometimes… and sometimes not). I have ttimeoutlen set to 0 so Esc in insert mode is responsive in tmux, but this issue manifests when not inside tmux.

I thought to post here for additional exposure in case anyone may have encountered and solved this before. My Vim experience is almost flawless… barring this one irritation.

https://redd.it/1amazqi
@r_vim

Читать полностью…

r_vim

A friend who just started learning vim sent me this
https://redd.it/1arrhqs
@r_vim

Читать полностью…

r_vim

Any way to get scratch buffer with "fields" in pure VimL?

Say I have a specific type of configuration file, and it's for loading specific settings into currently running embedded software (OT stuff). It's important that the user doesn't change the prefixes to the fields, or their order, otherwise the program consuming this will fail when writing them. So in the GUI world, this would be like 250 lines of a label + a text-field.

I was working on a terminal based Python application to have a form and some input validation, superior to what the vendor offers.

Note: Python Textual is great, but only provides ANSI escape sequences for the console, so it is not usable for older Windows machines you often find on the OT world. So I am using Prompt-Toolkit. It's a great library, but for full screen terminal apps there's a lot of re-inventing the wheel to get basic UI elements and motions, and still not as nice as VIM.

I realized I can use vim use job-start to wrap the CLI, and now it's working very nicely. But my efforts to find a way to have a "field" in a buffer have turned up blank.

1 )No new lines or moving lines. Buffer remap of newline keys to "j"? Lol.

2) Field names (prefix) are not modifiable. So I suppose worst case, these could be in a margin or an adjacent, non-modifiable buffer?

3) I would have autocompletion that is aware of the field prefix

4) I would have input validation (could just print to the status bar)

I didn't see any neovim plugins doing this kind of thing either. Any help appreciated!

https://redd.it/1arow7p
@r_vim

Читать полностью…

r_vim

[plugin] vim-gpt-commit: Generate git commit message using ChatGPT in Vim.
https://redd.it/1ar91ci
@r_vim

Читать полностью…

r_vim

JavaScript linting question

I'm using Vim through Git Bash, with Ale and eslint, to edit a NextJS/React applicaiton. There are two errors that I couldn't see until opening a file in VS Code, and that sucks. Any idea how to fix this? Ale/eslint sure gave me a hard time about bad spacing, but not these real errors:

1. One variable I was trying to use was spelled incorrectly - cycloid.Y (wrong) instead of cycloid.y (correct). cycloid.y is defined in the file I was editing.
2. Another variable was also spelled wrong - Colors.Yellow (wrong) instead of Colors.YELLOW (correct). Colors is imported from a different file!

Let me know if you need more information to help figure this out. Thanks!

https://redd.it/1aqqzdr
@r_vim

Читать полностью…

r_vim

Plugin

Hi i write plugin for comment multiple lines if you want to try

https://github.com/Gmm09x/Vim-plugins/blob/main/multiline\_comment.vim

https://redd.it/1aqftte
@r_vim

Читать полностью…

r_vim

Custom bindings by mnemonics or key positions for switching between keyboard layouts?

Thinking of switching from traditional Qwerty (can touch-type 99%, 100+ wpm) staggered to Colemak-DH on a split column-staggered keyboard for comfort. I'm reluctant to give up Qwerty on the laptop only because I can't imagine struggling with a public computer (not that I've used one in recent times, especially since smartphones replace this need) or for some imaginary scenario where I'm given loaner hardware for an interview (I'm a student in a CS-related field, not sure how common this is and whether it's weird to use/request to bring your wacky split keyboard to a professional setting--might not be a good first impression). I'm not against giving up Qwerty entirely though, but a staggered layout on a laptop keyboard is inevitable.

Anyway, I rely a lot on custom bindings since my workflow is already keyboard-driven using vim/emacs, tmux, a tiling window manager, and addons to applications that use vim-style bindings.

* It seems not rebinding any keys when switching to an alternate layout like Colemak-DH is recommended because vim bindings are mnemonics-based (or at most put arrow keys on a different layer where hjkl are). What about custom bindings of your own, like leader mappings? I assume they should also not be rebinded but I feel like common bindings don't need to be mnemonics-based and instead is pure muscle memory (e.g. my password was purely randomly generated and I can't tell you off the top of my head what it is without fingering a qwerty layout to spell it out). Rebinding obviously respects your muscle memory so I'm thinking it would reduce cognitive overhead switching between layouts more so than bindings based on mnemonics, at least for bindings you use daily (at least with regards to which fingers to press--split columnar is a little different to a traditional staggered layout.

https://redd.it/1aq20c4
@r_vim

Читать полностью…

r_vim

Vim adventures macro village level how to find key in house?

I'm stuck here in macro village and can't seem to find the key. The arrow suggests that I should look in that column (or something) but there is no key? And what else would I have to do to this text? I tried to hop onto every single letter but nothing happens.

House textfield in macro village

https://redd.it/1apl6f5
@r_vim

Читать полностью…

r_vim

Possible to copy, cut, and paste exactly like in any other text editor?

Hi. I am fairly new to vim and I was wondering if it is possible to configure it to allow me to copy, cut, and paste just as if I was on vscode, as long as I am on insert mode. Like I want to highlight text in insert mode, and copy it with command c (I am on mac), cut with command x, and paste with command v. Is this doable, or virtually impossible?

Thx

https://redd.it/1ap3urw
@r_vim

Читать полностью…

r_vim

mapping

In vimrc I have

nnoremap <leader>e :.w !bash

on testing -in commandline :verbose nnoremap <leader>e gives output "* :.w !bashe"

nnoremap <leader>E :.w !bash

on testing -in commandline :verbose nnoremap <leader>E gives output "* :.w !bashE"

Why is the letter after <leader>being apppended to word bash. This happens on whatever I try to remap, what am I doing wrong ?

Many thanx

https://redd.it/1anp66o
@r_vim

Читать полностью…

r_vim

<C-CR> Doesn't work in my terminal

I'm using vim on the linux terminal and I use gnome, so it sees <C-CR> as \^M, but I dont know how to setup the remap key? nnoremap <C-M> ... will just remap ctrl-m, not ctr-enter. What should I do?

https://redd.it/1anjfp7
@r_vim

Читать полностью…

r_vim

Plugin that highlights valid tex syntax only LaTeX

I have vimtex installed via vim-plug, but it highlights anything after a backslash. this: \slafjaslfj is highlighted. And I find that quite annoying tbh. What I really like about syntax highlighting is that it enables me to catch errors while I am typing.

Is there a vim plugin -- or some other solution -- that allows me to highlight only valid LaTeX commands?

https://redd.it/1ani16n
@r_vim

Читать полностью…

r_vim

how to select an entire URL (iw that would ignore punctuation)

Title says it all.

I wish I could type ciw and start typing, Suggestions are centered on visual mode (ex. move ahead, f space, c)

Better ideas?

https://redd.it/1amssmf
@r_vim

Читать полностью…

r_vim

Vim - using with external tools and remember session

Heya!

I'm currently using tig for exploring git projects and lf for file exploration. I'd love to use vim in conjunction with these, but it bothers me that when I exit vim, I lose the session along with it (so buffers etc. are all gone).

In emacs and kakoune, I can launch a server that I connect to, so that when I leave for tig, lf and then go back to a file, it still remembers all session data.

I'm curious how to set that up with vim. I think I can leverage sessions somehow but wonder how that would work.

https://redd.it/1amomnu
@r_vim

Читать полностью…

r_vim

for those still using netrw after all these years
https://redd.it/1amezro
@r_vim

Читать полностью…

r_vim

Help need using vim -Vundle and vim-flutter(I'm new to vim haha)

Anyone using vim -Vundle ? And if so, Have you managed to get vim-flutter working?


https://redd.it/1amb89r
@r_vim

Читать полностью…
Subscribe to a channel