Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Activity for mcp
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #284577 |
As mentioned in the other thread, there is a `histdel` function. You wisely pointed out that interprets the entry as regex which can lead to unintended removals.
I wonder if you can specify [very nomagic](https://vimhelp.org/pattern.txt.html#%2Fmagic) by prepending `\V` to the string. This should ... (more) |
— | 4 months ago |
Comment | Post #292285 |
Interestingly, `Alt-_` will work in insert mode while the newly bound `Alt-.` requires you to escape to normal mode. That makes `Alt-_` slightly faster to type. (more) |
— | 4 months ago |
Comment | Post #292285 |
`Alt-_` seems to work out of the box. (more) |
— | 4 months ago |
Comment | Post #292237 |
You can use `$_` as in `cd $_` to access the last argument to the last command. (more) |
— | 4 months ago |
Edit | Post #292237 |
Post edited: Specify vim in want text |
— | 4 months ago |
Edit | Post #292164 |
Post edited: Specify neovim and system information |
— | 4 months ago |
Comment | Post #292164 |
I realized I wasn't clear enough. I'm using Neovim. I just tested now in Vim 9.1 and it works. I'm looking for a solution for Neovim and, in particular, LunarVim. I will edit the original post. (more) |
— | 4 months ago |
Edit | Post #292237 |
Post edited: Add notes |
— | 4 months ago |
Edit | Post #292237 |
Post edited: Organize example into MWE section |
— | 4 months ago |
Edit | Post #292237 | Initial revision | — | 4 months ago |
Question | — |
How to enable `Alt + .` in bash with Vim bindings Want I want `Alt-.` get the last argument to the last command, as it does in a default bash terminal, when Vim bindings are enabled. Similar to this SO post, but with a bash terminal, not zsh. MWE ```sh $ mv file1 dir $ cd dir # "dir" input by hitting `Alt-.` ``` Have Using thi... (more) |
— | 4 months ago |
Comment | Post #292164 |
@Michael, can't message you directly so writing here. ([Don't know how to properly tag you either](https://meta.codidact.com/posts/292236)).
I didn't see Heading 1 discouraged in the help pages:
https://powerusers.codidact.com/help/formatting (more) |
— | 4 months ago |
Edit | Post #292226 |
Post edited: Add neovim to title |
— | 4 months ago |
Edit | Post #292226 |
Post edited: Specify neovim up front |
— | 4 months ago |
Comment | Post #292164 |
How about now? Which behavior are you experiencing? (more) |
— | 4 months ago |
Edit | Post #292164 |
Post edited: Leave MWE as it's own glanceable section |
— | 4 months ago |
Edit | Post #292226 |
Post edited: Add regex tag |
— | 4 months ago |
Edit | Post #292226 | Initial revision | — | 4 months ago |
Question | — |
How to trim trailing whitespace in all files except diffs in Neovim Problem I would like to trim trailing whitespace on save in all files except `.diff`s using Neovim. Have ```lua vim.api.nvimcreateautocmd({ "BufWritePre" }, { pattern = { "" }, command = [[%s/\s\+$//e]], }) ``` Source: https://vi.stackexchange.com/a/37427 Want Something suc... (more) |
— | 4 months ago |
Edit | Post #292164 |
Post edited: Smooth out opening |
— | 5 months ago |
Edit | Post #292164 |
Post edited: Specify config file |
— | 5 months ago |
Edit | Post #292164 | Initial revision | — | 5 months ago |
Question | — |
Wrapping comments in Neovim messed up by parentheses Problem Wrapping comments in Neovim gets messed up in the presence of parentheses. This happens with both auto wrapping and manual wrapping (`gw`). MWE This is what happens in a Python file (`file.py`): ```py This is a test python comment with parentheses near the line break (this is ... (more) |
— | 5 months ago |
Edit | Post #290158 | Initial revision | — | about 1 year ago |
Answer | — |
A: Reset all buffer variables to default in Emacs `M-x kill-local-variable` `RET` `c-basic-offset` seems to work, but only temporarily. If I save, and close Emacs, and revisit the file, the changes do not persist. I that in an affected directory, each file must be visited and a permanent version of this must be performed. Not ideal. (more) |
— | about 1 year ago |
Edit | Post #289923 |
Post edited: Fix typo |
— | about 1 year ago |
Edit | Post #289923 |
Post edited: Mention spacemacs |
— | about 1 year ago |
Edit | Post #289923 |
Post edited: Include application in title |
— | about 1 year ago |
Edit | Post #289923 | Initial revision | — | about 1 year ago |
Question | — |
Reset all buffer variables to default in Emacs Question How do you clear local variable customizations in buffer? In other words, how do you reset all variables to default? Use case This may be useful in instances where you `M-x customize-variable` and want to force those changes to persist on an open buffer. If I have edited a `.c` f... (more) |
— | about 1 year ago |
Edit | Post #289846 |
Post edited: Fix possible typo |
— | about 1 year ago |
Suggested Edit | Post #289846 |
Suggested edit: Fix possible typo (more) |
helpful | about 1 year ago |
Edit | Post #289895 |
Post edited: Change title |
— | about 1 year ago |
Edit | Post #289895 | Initial revision | — | about 1 year ago |
Question | — |
How to view history of tabs sent to devices in Firefox I will often send tabs to other devices for later viewing and sometimes these tabs get lost between power-ons or swiped away if I don't open them immediately. Is there a place where I can view the history of sent tabs and the path they traveled? (more) |
— | about 1 year ago |
Comment | Post #287926 |
`TAB` = `C-i` is okay with me. I think still some text is missing in the mode question. If I get your point, either mode works. It would be convenient to `TAB` while in insert mode to correct, but I won't let this restrict the solution. (more) |
— | almost 2 years ago |
Comment | Post #287926 |
Great point. Ideally yes I'd like it to be extensible.
> You mention but not the mode (normal or insert)? Note that = so if you map one you map the other.
>
> See also :h i_C-t.
I'm not understanding this part. I think some text got cut out. (more) |
— | almost 2 years ago |
Edit | Post #287936 | Initial revision | — | almost 2 years ago |
Question | — |
How to update log diff buffer with cursor MWE Using magit: 1. Open log buffer: `ll`. 2. Open a commit diff: `ENT`. 3. Go back to log buffer without closing diff: `window-other`. Question Starting from the MWE above, is there a way to have the diff buffer update according to which commit your cursor is on? This would be very conv... (more) |
— | almost 2 years ago |
Edit | Post #287926 |
Post edited: Make all headers level 1 |
— | almost 2 years ago |
Edit | Post #287926 | Initial revision | — | almost 2 years ago |
Question | — |
How to indent list items in Vim Problem How do I indent a list item in Vim the following way? Ideally I want this to happen automatically upon wrap, but will settle for something like `ESC TAB` doing the trick. Have ```txt This is a list: 1. This is a list item. 2. This is a long list item that I am wrapping at 72 charact... (more) |
— | almost 2 years ago |
Edit | Post #287741 |
Post edited: Add location of hook |
— | almost 2 years ago |
Edit | Post #287741 | Initial revision | — | almost 2 years ago |
Question | — |
Change indent width in scad-mode MWE ```scad translate() square(); ``` Problem I'd like to set the number of spaces per indent in `scad-mode` to `2`. When I press tab on the second line in the MWE, it should result in: ```scad translate() square(); ``` Tried Tried setting `tab-width`, `c-basic-offset`, `sta... (more) |
— | almost 2 years ago |
Comment | Post #287709 |
This is outstanding, thank you! Plus, if I figure out the cause of the black bar, the command becomes very clean and simple.
I am withholding marking this as the solution in the case that a grafx2 one comes along. (more) |
— | almost 2 years ago |
Comment | Post #287703 |
I added the example images. Hope they help! (more) |
— | almost 2 years ago |
Edit | Post #287703 |
Post edited: Add example images |
— | almost 2 years ago |
Comment | Post #287703 |
I was considering this, but reasoned that it would be hard to portray the difference, besides the first taking up a lot more of the page, particularly with a white background.
Is the intended goal not clear without a picture? (more) |
— | almost 2 years ago |
Edit | Post #287703 | Initial revision | — | almost 2 years ago |