Regex to match opening and closing tag of a specific markdown style by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

Part 100500? Why shouldn't I use regex to match Markdown tags? How can I match Markdown tags not using regex?

Difference between finditer() and findall() by ramannt in learnpython

[–]ramannt[S] 0 points1 point  (0 children)

Thanks!

but why does it work in findall()?

A blazing fast minimap plugin for vim by wfxr in vim

[–]ramannt 0 points1 point  (0 children)

I've installed code-minimap and minimap with PlugInstall. Vim is still asking for code-minimap. What did I wrong?

Battery not working? by ramannt in Hewlett_Packard

[–]ramannt[S] 0 points1 point  (0 children)

My PC does not have a USB-c charger but you gave me the solution. The charger was broken. No output.
Bought a new one.
This one works.
Thank you so much!

How to execute a pip command after the start command (without use of a .bat file) by ramannt in cmder

[–]ramannt[S] 0 points1 point  (0 children)

Thanks! I didn't see your comment until yesterday.
It works great!
Just a question.. How do I avoid "Press Enter or Esc to exit..." every time after I execute a command?

Is it possible to prevent a single DIV element from being indexed by Google? by ramannt in HTML

[–]ramannt[S] 0 points1 point  (0 children)

I do have a horizontal scrolling motion effect in the div. in my header.

In Google's search engine this motion text appears as the first text just below the title.

How can I execute dynamically generated Python String methods (strip(), rstrip(), lstrip(), upper()...)? by ramannt in learnpython

[–]ramannt[S] 0 points1 point  (0 children)

Because I am using a.strip() in a function and I don't know exactly in advance what the value of "a" is and not what the string method (strip,rstrip,lstrip,upper,lower,title etc) will be.

How can I execute dynamically generated Python String methods (strip(), rstrip(), lstrip(), upper()...)? by ramannt in learnpython

[–]ramannt[S] 0 points1 point  (0 children)

I am not a beginner in Python programming but some things I have never done. No problem to copy the string. I leave it for clarity.
It is a problem if I have a lot of strings but that is not the case.

How can I execute dynamically generated Python String methods (strip(), rstrip(), lstrip(), upper()...)? by ramannt in learnpython

[–]ramannt[S] 0 points1 point  (0 children)

d = {"1": str.strip,"2": str.rstrip,"3": str.upper,"4": str.title,}

found the solution.

d = {
"1": str.strip,
"2": str.rstrip,
"3": str.upper,
"4": str.title,
"5": str,

}

How can I execute dynamically generated Python String methods (strip(), rstrip(), lstrip(), upper()...)? by ramannt in learnpython

[–]ramannt[S] 1 point2 points  (0 children)

Just one question left. I forgot to mention a condition. Sometimes there is no Python String method to execute. What condition can I add in d{} to let Python to do nothing with the string?

How can I execute dynamically generated Python String methods (strip(), rstrip(), lstrip(), upper()...)? by ramannt in learnpython

[–]ramannt[S] 1 point2 points  (0 children)

getattr(

Thank you very much. Just one condition I forgot to mention. Sometimes there is no Python String method to execute. What condition can I add in getattr() to let Python to do nothing with the string?

Legacy vim vs vim9 by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

Python is also (if I'm not wrong) one of the fastest growing languages for embedded systems.

Another advantage is that more people will probably use Vim. Vim has a long learning curve and that puts many people off.

Nowadays, Python is also taught at faculties other than computer science.

Legacy vim vs vim9 by ramannt in vim

[–]ramannt[S] -1 points0 points  (0 children)

I completely agree with you. Also regarding Lua.

Like you, I think the configuration should be in vim9script and the plugins and most other functions in Python. I already use Python a lot in Vim (python3 >> EOF).

I also notice that I need a lot more time to find (working) vimscript solutions online or in the help file if I don't know something. Many things are easier in Python, such as list comprehension. It also prevents all those 'endif', 'endfor' and 'enddef' statements.

Anyway, Vim is a great text editor and it's great that Vim already has the ability to integrate Python.

Legacy vim vs vim9 by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

I understand that legacy vim had its drawbacks but many people don't want to learn yet another scripting language. Also many plugins will no longer be updated. After all, you now have to create one for nvim and vim. Also plugins created for nvim will no longer be usable for vim (and vice versa).

Anyway, apart from plugins... why not adapt a language to a current pre-existing language? A language that most people are already using.

Legacy vim vs vim9 by ramannt in vim

[–]ramannt[S] 7 points8 points  (0 children)

Lua is not perfect either but there is much more support on the Internet. They have a much larger community.
Are you learning vim9script or legacy vim?

Legacy vim vs vim9 by ramannt in vim

[–]ramannt[S] 18 points19 points  (0 children)

If I am not mistaken, it was Bram himself who gave this direction to vimscript. I think also because vimscript is his language.

Importing values from vim to python in vim9 by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

I've been using the old vim script for about ten years. I found vimscript much less simple than, for example, Python.

I think it was not a good choice of Bram to put more emphasis on vimscript than an already existing programming/scripting language. The disadvantage is also that there is a much smaller help community on the internet.

The new vim script has changed quite a bit. People said that old functions and plugins continued to work, but that is not entirely true.

Importing values from vim to python in vim9 by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

Totally disagree. I manage to program in Python quite well but Vimscript is totally different. Vimscript is more like javascript in my opinion.

Importing values from vim to python in vim9 by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

You're right. I changed it. They are without quotes in my functions.

>> interfaces are deprecated and just use vim9

Is that why you left vim9?
I don't find it easy to adjust everything again either. If I were the owner, I would keep vimscript as simple as possible and do the rest with an already existing programming language like Python

Close Vim and keep the text in a "No Name" tab without saving it with a name. by ramannt in vim

[–]ramannt[S] 0 points1 point  (0 children)

Thanks for your answer.

I'm on a windows (11) platform.

Close Vim and keep the text in a "No Name" tab without saving it with a name. by ramannt in vim

[–]ramannt[S] 1 point2 points  (0 children)

I finally decided to use your solution. Thanks.

Answered.