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.
Posts tagged vim
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...
Problem I would like to trim trailing whitespace on save in all files except .diffs using Neovim. Have vim.api.nvim_create_autocmd({ "BufWritePre" }, { pattern = { "*" }, command = [[%s/\s...
I have a custom spreadsheet viewer in Vim that splits the headers into a top pane and the rest into a bottom pane. I bind horizontal scrolling so that scrolling right keeps the headers above the co...
Occasionally someone* occasionally modifies one of the files I'm responsible for with an archaic tool that decides to convert the updated file to UTF-16 (probably lossless) or an even more archaic...
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 This is a ...
I often open an terminal within vim via: :vert term. The terminal opens on the right side with the same style (background and foreground colors) as my vim style. Is it possible to change the styl...
MWE line 1 line 2 line 3 line 4 line 5 line 6 line 7 Go to "line 4": /line 4 ENT. Delete into register: dd. Replace everything with register using only ex mode. (Non-ex equivalent: gg...
MWE 5 4 3 2 1 0 Go to the end of the file: G. Question Using spacemacs, how do I put the line with 3 at the top of the screen without moving the cursor? With moving the cursor that wou...
MWE In Vim: mm. o ESC mm (by accident, meant mn). Question How do I jump to the original mark m set in action 1.? Edit I'm sorry, what I meant was you issue mm when you meant 'm. (It al...
Sometimes I accidentally enter a command with a typo in Vim, e.g. :e!fil instead of :e!file. As a consequence, the incorrect command clutters the history until it is evicted from the binary .vi...