vim change :x function to delete buffer instead of save & quit
I find the safest alternative is to use an expression abbreviation: cnoreabbrev <expr> x getcmdtype() == “:” && getcmdline() == ‘x’ ? ‘bd’ : ‘x’ This will ensure the abbreviation will only be expanded to bd when 😡 is used otherwise just expand to x. For more help: :h map-<expr> :h getcmdtype() :h getcmdline() Upon … Read more