5 ms·
> And it was most frustrating when they had like 100 columns or so. Having to change column 63 at line 58 is not something you do easily in Notepad++. Import to
by izolate 6y ago
> And it was most frustrating when they had like 100 columns or so. Having to change column 63 at line 58 is not something you do easily in Notepad++. Import to Excel was my way to go, but since the file was not a standard CSV file (e.g. also had sections like an .INI file) it was time consuming: first just select a subsection from the file, save to a different file, import to Excel, modify, paste back, etc.
Suggestion: have you considered learning to use Vim? I imagine most Vim users are reading your example wondering what the big deal is.
Not to take away from the spirit of your post, though. You have valid questions.
- wcarss 6y agoAs a longtime vim user, I don't see how vim makes going to the Nth logical column (for several values of N in different rows) in a large "CSV-like" file much easier. Navigating in general is easier, sure, but... do you have a trick to share perhaps?
- juancampa 6y agoSomething like this works as long as there are no commas within a cell. 58G63f, Takes you to cell at 58:63 (might have off-by-1 errors, don't know)
- izolate 6y ago58G 63f, 1. Go down to line 58 2. Jump to the 63rd comma 3. Edit
- pluies 6y agoThis could lead you to the wrong place if, for example, some quoted values on this row contains commas, no?
- izolate 6y ago100%. It's not infallible. There are CSV plugins for Vim that bring increased confidence.
- alpaca128 6y agoIn those cases it gets a bit trickier but still relatively straightforward thanks to regex-based search. If needed frequently you can also just create a keybinding that does the regex typing for you. Though I'm usually in the position where I create this kind of file myself and so I just go with semicolons as column separators. Those are much less likely to cause such collisions.
- wcarss 6y agoFascinating, thanks! I had never seen/used `f` to navigate within a line like this -- I'm usually just typing /<string> and hitting enter to scan forward.
- dharmab 6y agoEasyMotion makes it effortless. https://github.com/easymotion/vim-easymotion https://github.com/easymotion/vim-easymotion
- craftydev 6y agoVisidata is great for this kind of thing, exploring and editing csv. https://www.visidata.org/ https://www.visidata.org/ https://www.visidata.org/docs/edit/ https://www.visidata.org/docs/edit/
- deviance 6y ago(OP) I've had a short look at Visidata. Maybe it works or not on my described scenario (I should read the docs more carefully and make a test to be sure), but it's definitely in the direction I had in mind (a simple yet customizable enough tool for the job).
- leonim 6y agoThe tutorial is well written and gives a great tour of the tool: https://jsvine.github.io/intro-to-visidata/ https://jsvine.github.io/intro-to-visidata/