@@ -14,6 +14,7 @@ A comfortable CSV/TSV editing plugin for Neovim.
14
14
- ** Text Objects & Motions** : Conveniently select fields or move across fields/rows.
15
15
- ** Comment Ignoring** : Skips specified comment lines from the table display.
16
16
- ** Sticky Header** : Keeps the header row visible while scrolling.
17
+ - ** Auto-Detection** : Automatically detects delimiters and headers based on file content.
17
18
- ** Flexible Settings** : Customizable delimiter and comment prefix.
18
19
- ** Two Display Modes** :
19
20
- ` highlight ` : Highlights delimiters.
@@ -263,6 +264,55 @@ lua require('csvview').setup()
263
264
264
265
## 📋 Feature Guide
265
266
267
+ <details >
268
+ <summary ><strong >Display Configuration</strong ></summary >
269
+
270
+ #### Display Modes
271
+
272
+ ** Highlight Mode (Default)**
273
+
274
+ Highlights delimiter characters in place:
275
+
276
+ ``` lua
277
+ {
278
+ view = {
279
+ display_mode = " highlight" ,
280
+ },
281
+ }
282
+ ```
283
+
284
+ ** Border Mode**
285
+
286
+ Replaces delimiters with vertical borders (` │ ` ):
287
+
288
+ ``` lua
289
+ {
290
+ view = {
291
+ display_mode = " border" ,
292
+ },
293
+ }
294
+ ```
295
+
296
+ ** Toggle display modes:**
297
+
298
+ ``` vim
299
+ :CsvViewEnable display_mode=highlight
300
+ :CsvViewEnable display_mode=border
301
+ ```
302
+
303
+ #### Column Layout
304
+
305
+ ``` lua
306
+ {
307
+ view = {
308
+ min_column_width = 5 , -- Minimum width for each column
309
+ spacing = 2 , -- Space between columns
310
+ },
311
+ }
312
+ ```
313
+
314
+ </details >
315
+
266
316
<details >
267
317
<summary ><strong >Delimiter Configuration & Auto-Detection</strong ></summary >
268
318
@@ -329,9 +379,6 @@ The plugin automatically detects the most appropriate delimiter by analyzing you
329
379
}
330
380
```
331
381
332
- > [ !NOTE]
333
- > Multi-character delimiters are supported (e.g., ` || ` , ` :: ` , ` <> ` ), but regular expression patterns are not supported (e.g., ` \s+ ` ).
334
-
335
382
#### Command-line Delimiter Options
336
383
337
384
``` vim
@@ -347,54 +394,7 @@ The plugin automatically detects the most appropriate delimiter by analyzing you
347
394
:CsvViewEnable delimiter=\t " Tab
348
395
```
349
396
350
- </details >
351
-
352
- <details >
353
- <summary ><strong >Display Configuration</strong ></summary >
354
-
355
- #### Display Modes
356
-
357
- ** Highlight Mode (Default)**
358
-
359
- Highlights delimiter characters in place:
360
-
361
- ``` lua
362
- {
363
- view = {
364
- display_mode = " highlight" ,
365
- },
366
- }
367
- ```
368
-
369
- ** Border Mode**
370
-
371
- Replaces delimiters with vertical borders (` │ ` ):
372
-
373
- ``` lua
374
- {
375
- view = {
376
- display_mode = " border" ,
377
- },
378
- }
379
- ```
380
-
381
- ** Toggle display modes:**
382
-
383
- ``` vim
384
- :CsvViewEnable display_mode=highlight
385
- :CsvViewEnable display_mode=border
386
- ```
387
-
388
- #### Column Layout
389
-
390
- ``` lua
391
- {
392
- view = {
393
- min_column_width = 5 , -- Minimum width for each column
394
- spacing = 2 , -- Space between columns
395
- },
396
- }
397
- ```
397
+ ** NOTE** : Multi-character delimiters are supported (e.g., ` || ` , ` :: ` , ` <> ` ), but regular expression patterns are not supported (e.g., ` \s+ ` ).
398
398
399
399
</details >
400
400
@@ -573,28 +573,6 @@ In this example:
573
573
:CsvViewEnable quote_char=
574
574
```
575
575
576
- #### Multi-line Field Support
577
-
578
- Quoted fields can span multiple lines:
579
-
580
- ``` csv
581
- id,description
582
- 1,"This is a long
583
- description that spans
584
- multiple lines"
585
- 2,"Another field"
586
- ```
587
-
588
- Configure the parser for multi-line fields:
589
-
590
- ``` lua
591
- {
592
- parser = {
593
- max_lookahead = 50 , -- Maximum lines to search for closing quotes
594
- },
595
- }
596
- ```
597
-
598
576
</details >
599
577
600
578
<details >
@@ -676,28 +654,6 @@ Only the data rows (`name,age,city`, `John,25,NYC`, `Jane,30,LA`) will be displa
676
654
" Multiple comment types (requires Lua configuration)
677
655
```
678
656
679
- #### Advanced Comment Configuration
680
-
681
- ``` lua
682
- {
683
- parser = {
684
- comments = {
685
- " #" , -- Shell/Python style
686
- " //" , -- C++ style
687
- " --" , -- SQL style
688
- " ;;" , -- Custom comment prefix
689
- },
690
- },
691
- }
692
- ```
693
-
694
- #### Use Cases
695
-
696
- - ** Data files with metadata** : Skip header comments explaining the data format
697
- - ** Generated CSV files** : Ignore generator information or timestamps
698
- - ** Configuration files** : Skip documentation lines in CSV-like config files
699
- - ** Log analysis** : Focus on data rows while ignoring log headers
700
-
701
657
</details >
702
658
703
659
## 🌈 Highlights
0 commit comments