:vimgrep can take multiple file globs. In simple cases that means you can potentially search only places you want instead of excluding (think white-listing vs black-listing)
:vimgrep /foo/ bar/** baz/**
Often :vimgrep isn't up to the task from performance and/or complex searching perspective. Instead you can use Vim's :grep command to use an external ...
ALE's readme says
ALE offers support for fixing code with command line tools in a non-blocking manner with the :ALEFix feature
so ALEFix is asynchronous and your yanking commands would need to wait for it to complete before they run.
If you look further in the Readme in the FAQ there is How can I execute some code when ALE starts or stops linting? The ...
You can invert a boolean with !:
let foo = 1
echo foo " will print 1
let foo = !foo
echo foo " will print 0
I'm afraid I can't help much with the overall function as I am unfamiliar with minimap, but that might help you get started. Note that the syntax in your ternary operatory is incorrect. If you are doing it that way you want:
let foo = foo =...
In Vim, if you look at the source code for buflist_new() which adds a filename to the buffer list you'll find the part where the b: dictionary is initialized
// init b: variables
buf->b_vars = dict_alloc();
if (buf->b_vars == NULL)
init_var_dict(buf->b_vars, &buf->b_bufvar, ...
You have several ways to do it:
You can use <bar> which is the key code for | to be used in a mapping (Do not use | directly in your mapping):
nnoremap <leader>a :echo "fizz" <bar> echo "buzz"<CR>
This is the equivalent of running :echo "fizz" | echo "buzz" in the command line.
You can also ...
Mapping the escape key like this tends to break things because of the way certain special characters are handled (references needed/appreciated). I would also recommend avoiding <C-t> and <C-]> as they are pretty useful commands (:help CTRL-T, :help CTRL-]). You might want to know about gt and gT for navigating tabs. They also take a count.
A substitution like this works for all scenarios:
Grab everything within print brackets (.*) using regex
replace the match with a join statement surrounding the match
replace the print with log.info (or whatever is required)
Here is the test script if anyone wants to try it for themselves:
After some try-and-errors I resolved this problem.
Btw, if I add to it, would the never be triggered?
Change nnoremap <C-W> <NULL> to:
nnoremap <C-W> <ESC>
Since normally no key will follow <ESC>. (Remember when you were a newbie and wanted to escape from it)
Result, done in 1 second:
Finally, I decided not to re-invent the wheel, and this problem seems to be more difficult than I think. So, I give Vem-Tabline a try and it works nicely, and the default settings of this plugin are good, so no need to put code into my .vimrc. Nice!
Now my MacVim looks like this, the prefix of buffer names are now skipped by default:
Knowing from :help ale-python-pylint that we want to adjust g:ale_python_pylint_options to include --rcfile, I would drop
let g:ale_python_pylint_options = '--rcfile '.<filename>
in wherever the right place is for you. That could be wherever you configure ALE, if a single setting is right; or, it could be in an ftplugin (use b:…) if you need to change ...
You can only call plug#begin() and plug#end() once, so no this will not work.
You can define all your plug-ins from the same place (such as the vimrc file) and use a conditional to detect whether you're running NeoVim to load plug-ins you only want on NeoVim:
" Vim + NeoVim plug-ins
Just put the terminal colorscheme in your vimrc (usually ~/.vimrc or $HOME\_vimrc on Windows) and the gui colorscheme in your gvimrc. Create ~/.gvimrc / $HOME\_gvimrc if you don't already have that file.
This works because gvimrc is only read when you run gvim and it is read in after vimrc
Here's a simple version, assuming fugitive or dispatch are installed:
" for dispatch, automatically async
" use a ! or other dispatch commands for more control
autocmd VimEnter Dispatch git -c ~/dotfiles pull
" or for fugitive, not so async
autocmd VimEnter Git -c ~/dotfiles pull
If those ...
The question is invalid. Maybe XY problem or something.
If &indentexpr is set to some function then that function calculates on-the-fly the number of spaces to indent a line. If also &expandtab is not set then Vim is allowed to minimize that number by outputting tabs - one hard tab per &tabstop spaces.
But if you set expandtab then you say: "...
Building uppon Lie Ryan's answer and the code provided above (it is described here)
Change your function parsing the git branch as follows:
let g:gitparsedbranchname = ' '
let l:string = system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:...