Code Monkey home page Code Monkey logo

vim-tsv's Introduction

Inspired by this post. . .

Vim and plaintext data files: http://briancarper.net/blog/552/

. . . this plugin sets Vim's listchars for files ending in .tsv (tab separated values) and turns off wrap, such that a file might look like this:

Name»-------------Language»---------Current Release»--Last Updated»----…
Jekyll»-----------Ruby»-------------0.11.2»-----------2011-12-27»------…
Hyde»-------------Python»-----------0.4»--------------2009-10-06»------…
ikiwiki»----------Perl»-------------3.20120629»-------2012-06-29»------…

If the columns are too wide (or too narrow) for the data you're viewing, you can change the tabstop with set tabstop = 14, for example.

At launch, you can also adjust the tabstop with something like this:

vim "+set tabstop=30" data.tsv

vim-tsv's People

Contributors

pdurbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vim-tsv's Issues

Column Wrap

I'm not even sure this is possible. My Vim-fu needs some work.

But I was trying to think of a way to wrap a column to help display tab widths a little better.

Example being:
Now

Column 1>>--Column 2>>--Column 3>>
My Value Col 1>>--------My Value for column 2>>--------My value for column 3>>

Proposed

Column 1>>--Column 2>>--Column 3>>
My Va...>>--My Va...>>--My va...>>

Then a way to toggle between overflow and wrapping would be good to allow an easy way to see if columns match up with headers and such.

Pressing tab should insert a tab

My .vimrc sets softtabstop=8, while vim-tsv sets tabstop=20. So if I open a .tsv file and press tab, I actually get some number of spaces rather than a literal tab.

I think the solution is as easy as adding set softtabstop=20 to ftplugin/tsv.vim. As per #1 , it might be nice if there is a way to set both softtabstop and tabstop at the same time if you do need to expand the visual column width while editing a particular tsv.

Add LICENSE file

Hey there! I was looking around for a file type plugin for .tsv files, and was glad to find yours. I'd like to use it as a basis for more complicated scripts and distribute it with my dotfiles. To ensure that I can credit this properly, could you add a LICENSE file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.