dotfiles/nvim/.config/nvim/after/ftplugin/csv.lua
Marty Oehme b7d2fdea3d
nvim: Add csvview for tablelike csv files
Gives a very nice viewing and editing experience for csv files. Not sure
what the performance impact is for bigger files, but certainly is worth
it for the smaller ones.
Automatically switches on the view for `.csv` and `.tsv` files.

Additionally, adds some keymaps whenever a csv-like file is loaded (i.e.
when the `CsvViewEnable` mode is on):

<s-j> and <s-k> to traverse up and down rows, <s-l> and <s-k> to
traverse columns left and right. Adds a 'field' textobject (`if` and
`af`), though only a single field can currently be changed at once.
2025-12-12 23:47:49 +01:00

4 lines
129 B
Lua

-- turn on a nice table view if we have it
if require("core.util").is_available("csvview") then
require("csvview").enable()
end