vim – Verilog Mode – how to turn off colors for /* */ comments?

I am using vim to edit a customer’s Verilog libmap file and the syntax highlighting for multi-line comments is causing very odd color enabling/disabling. The problem is that the libmap is searching large numbers of files in multiple directories so there are lots of dir1/dir2/*/*/*/*/*.v searches and each /* turns on comment colors and each corresponding */ turns it back off, so with all of the libmap wildcard directories the comments are turning on and off and sometimes remain off on the next active line of code.
I just want to know how to define (undefine) comment colors in Verilog mode. I will leave colors on for single line comments (// comment) but disable them for multi-line comments (/* */), which I rarely use, or perhaps change multi-line comments to require a space after /*.
I have snooped around the syntax definition file but cannot spot how the comments are being handled.
I am hoping this is relatively easy to do.
Regards – Cliff Cummings

development environment – Logical choice between VIM and Doom EMACS

I like the VIM Key bindings editing on VIM. I’ve researched online and found Doom Emacs EVIL mode can do “EVERYTHING” VIM can when it comes to writing code and productivity, plus more. Not really sure how accurate that is. If this is not true, then are the features not available in DOOM Emacs that is in VIM a deal breaker? I know Emacs is a whole ecosystem not just a text editor.

What are the reasons why I should choose VIM over Doom EMACS if Doom EMACS can do “Everything” VIM can.

All I want is a Dev environment for C, C++, Javascript and Python that boosts productivity and “lightwight”. At least lighter than VS Code, ATOM, Sublime Text or Notepad++.

Colorshceme en vim no funciona correctamente

Hola estoy usando powershell en windows terminal, funciona en el archivo de configuracion .vimrc pero no al editar un archivo,
introducir la descripción de la imagen aquí

pero cuando es otro archivo no funciona,

introducir la descripción de la imagen aquí

por ejemplo en el console.log no funciona solo en function

No vim found, using vi

I’m on Fedora 33 Server. I’ve removed vi and installed vim-enhanced:

dnf remove vi
dnf install vim-enhanced

But I get this error on using vim command:

[root@localhost ~]# vim
No vim found, using vi, press ENTER to continue
-bash: vi: command not found
[root@localhost ~]#

This is how to my $PATH looks like:

[root@localhost ~]# echo $PATH
/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin
[root@localhost ~]#

Though /usr/bin path exists in $PATH, I’ve to explicitly write the path every time I need to execute vim command:

[root@localhost ~]# /usr/bin/vim

Please help me understand what is going on.

malware – Can I check the content of a suspicious file directly on the server using an editor, e.g. vim?

In order for the opening of the file to pose a risk, the file would need to include an exploit for the specific text editor you use. Then when you open the file, the exploit would trigger.

While possible that’s not very likely. It certainly isn’t common.

The far more likely threat is that there is malicious PHP code in the file that triggers when the file is executed by a PHP server.

But all that aside, I’m not sure why you are questioning whether you have been infected when you are looking at files being served that you did create and there are links to malware. You’ve been infected. Start with that assumption…

Como ejecutar archivo python en vim

Hola estoy aprendiendo a utilizar vim en linux(lubuntu), he descargado python.vim. Quiero ejecutar un archivo python, he intantado utilizar

:w !python

pero me sale:

/bin/bash: python: orden no encontrada

el intérprete de órdenes devolvió 127

¿Qué necesito algun script? o que me recomendais.

MacVim color scheme has the right color, but vim through Terminal doesn’t

I’ve installed color schemes that seem to be working well with MacVim.

When I run Vim using Terminal, however, the colors change and the color scheme doesn’t appear to be working anymore.

Is there a way to get it to support the true color the color schemes intend?

vimscript – Vim plugin Nudge Lines

I’ve published a Vim plugin that nudges visually selected lines up or down, which for the most part seems to function as designed. However, I believe there are likely ways that this plugin could be improved.


Questions

  • How do I register a movement that takes an optional amount?

In other words how can this plugin differentiate between Shift^J and 3Shift^J?


Requirements

This plugin is tested on Linux based operating systems, but suggestions on how to make it OS agnostic are certainly welcomed; regardless Vim should be installed prior to using this plugin, eg…

sudo apt-get install vim

Setup

Source code is maintained on GitHub, as are the documentation files and README.md. Included within this question are the TLDR and source .vim script code files.

mkdir -vp ~/git/hub/vim-utilities

cd ~/git/hub/vim-utilities

git clone git@github.com:vim-utilities/nudge-lines.git

If not utilizing some form of Vim plugin manager, then the linked-install.sh script may be run on most ‘nix devices…

./linked-install.sh

… which will symbolically link plugin scripts and documentation, and update Vim documentation tags.


Usage

After visually selecting a line, or range of lines, use the following keyboard shortcuts:

  • Ctrl^k Nudge visual selection up

  • Shift^K Nudge visual selection up and reformat tabs

  • Ctrl^j Nudge visual selection down

  • Shift^J Nudge visual selection down and reformat tabs


Source Code

plugin/nudge-lines.vim

#!/usr/bin/env vim


vnoremap <S-K> :call Nudge_Selection__Laterally(-1, 'reformat')<CR>
vnoremap <C-K> :call Nudge_Selection__Laterally(-1)<CR>

vnoremap <S-J> :call Nudge_Selection__Laterally(1, 'reformat')<CR>
vnoremap <C-J> :call Nudge_Selection__Laterally(1)<CR>


""
" Nudges visually selected lines up or down
" @param {number} a:amount - Signed integer of lines to nudge selection by
" @param {string()} a:0 - Optionally reformat tabs
" @example
"   :'<,'> call Nudge_Selection__Laterally(-1, 'reformat')
" @author S0AndS0
" @license AGPL-3.0
function! Nudge_Selection__Laterally(amount, ...) abort range
  let l:not_visual_mode = visualmode() != 'V'
  let l:at_limits__lower = a:lastline == line('$')
  let l:at_limits__upper = a:firstline == 1
  if l:not_visual_mode
   || (a:amount > 0 && l:at_limits__lower)
   || (a:amount < 0 && l:at_limits__upper)
    normal! gv
    return
  endif

  if a:amount > 0
    let l:move_command = "'>+" . a:amount
  elseif a:amount < 0
    let l:move_command = "'<-" . (1 - a:amount)
  else
    throw 'amount must be greater or less than 0'
  endif

  execute "'<,'>move " . l:move_command

  if a:0 == 0
    normal! gv
  else
    normal! gv=gv
  endif

  silent! foldopen!
endfunction

Side note, I’m not sure what’s going on with syntax highlighting here, but as of latest revisions this plugin seem to function without error.

¿Qué versión de vim funciona con python 3?

Tengo instalado python 3 y vim 8.2, pero esta versión de vim no se integra con python 3.
Estoy tratando de instalar el plugin YCM pero me muestra un error de que necesita vim compilado con python 3+.

plugin – Necesito un plug para “VIM” que me autocomplete o auto-cierre las llaves, corchete etc

Hola y muy buenas tardes a todos, estoy aca para preguntarles si alguien me podria indicar algun autocompletado o bueno auto-cerrado de llaves para “VIM”, corchete etc, enfocado en “JS” aunque igual deberia funcionar en cualquier lenguaje

Llevo trabajando con “VIM” Hace un par de semanas asi que me considero muy nuevo todavia y no en logrado poder encontrar ese plug, o alguna config que ya venga con “VIM” Agradezco su ayuda!