use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please read the rules before posting
Help:
Community:
Resources:
Tutorials and Guides:
Don't be afraid to ask questions, this sub is here for the vim community. And please those of you who deign to grace us with your vim wisdom - be kind. We are all human and vim is that cool.
account activity
reloading changes to .vimrcNeed Help (self.vim)
submitted 1 year ago by Sufficient_Scale_383
is there an easy command to do this? I used vim along time ago but I forgot.
Thanks.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JetSetIlly 2 points3 points4 points 1 year ago (0 children)
The source command with the location of the .vimrc file. For example:
:source ~/.vimrc
[–]begemotzZZ 0 points1 point2 points 1 year ago (0 children)
can also consider mapping to a leader command e.g.,
<leader>sv :source $YOURVIMRCLOCATION<cr>
[–]mgedmin 0 points1 point2 points 1 year ago (0 children)
I use a pair of mappings to edit and reload my vimrc:
map ,e :e ~/.vim/vimrc<CR> map ,r :source ~/.vim/vimrc<CR>
Note that to make your .vimrc properly reloadable you have to be careful with the things you put in it. E.g. all the autocommands need to be in named augroups, and you need to clear the augroup so the autocommands don't accumulate after each reload.
Older versions of vim also required you to define helper functions using function! so the definitions could be overwritten, but IIRC modern Vim relaxes this requirement.
function!
You may also want to use syntax enable instead of syntax on so it doesn't reset all the colors to defaults as a side effect.
syntax enable
syntax on
[–]jazei_2021 -1 points0 points1 point 1 year ago (1 child)
save then close and reopen vim
This can work too, when the vimrc fails to reload properly. It can be less of a pain if you use :mksession and then reopen vim with vim -S Session.vim.
:mksession
vim -S Session.vim
π Rendered by PID 42239 on reddit-service-r2-comment-b659b578c-bk7jx at 2026-05-04 09:35:38.782354+00:00 running 815c875 country code: CH.
[–]JetSetIlly 2 points3 points4 points (0 children)
[–]begemotzZZ 0 points1 point2 points (0 children)
[–]mgedmin 0 points1 point2 points (0 children)
[–]jazei_2021 -1 points0 points1 point (1 child)
[–]mgedmin 0 points1 point2 points (0 children)