How do I delete a word and previous white space in VIM?

^ denotes char under cursor for vim Please dont answer with T motion because it will require me to know the last character , which helps me but I want to know if there is any other way I have a line of text: these are test words now if I want to delete the… Read More How do I delete a word and previous white space in VIM?

Removing only the function body using `di{` in Vim

I’ve recently started learning Vim and got stuck on its behavior regarding changing/deleting text objects, particularly code blocks surrounded by curly braces. Here is an example of code: function main() { console.log("Hello world"); } If I move my cursor at the beginning of the word function and enter the following combination: di{ Vim will delete… Read More Removing only the function body using `di{` in Vim

Vim: How to declare that a file with a certain name should be of some file type?

I have a file named ini which receives no syntax highlighting since there is no file extension to help identify the file type. How would I go about declaring that all files which are named ini should be of type dosini? >Solution : :h ftdetect may help you. Basically it is autocmd BufNewFile,BufRead *.ini setfiletype… Read More Vim: How to declare that a file with a certain name should be of some file type?

How to populate the quickfix list or location list of Vim/Neovim with arbitrary linter output?

Say I just ran a linter in the terminal and I have a bunch of linter output in the standard format: path/to/some/file.foo:45:23: This is an error message path/to/some/file.foo:46:12: This is another error message … I am currently opening each file manually in Neovim, navigating to the correct line and fixing the issue. Instead, I want… Read More How to populate the quickfix list or location list of Vim/Neovim with arbitrary linter output?