Search Results

Search found 3 results on 1 pages for 'kine'.

Page 1/1 | 1 

  • How to columnate text with tabs (in vim or on the shell)

    - by kine
    I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs): # original format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 # ideal format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in. Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....

    Read the article

  • UTF-8 locale portability (and ssh)

    - by kine
    I spend a lot of my time sshed into various machines, all of which are different (some are embedded, some run Linux, some run BSD, &c.). On my own local machines, however, i use OS X, which of course has a userland based on FreeBSD. My locale on those machines is set to en_GB.UTF-8, which is one of the available options: % echo `sw_vers` ProductName: Mac OS X ProductVersion: 10.8.2 BuildVersion: 12C60 % locale -a | grep -i 'en_gb.utf' en_GB.UTF-8 Several of the more-capable Linux systems i use appear to have an equivalent option, but i note that on Linux the name is slightly different: % lsb_release -d Description: Debian GNU/Linux 6.0.3 (squeeze) % locale -a | grep -i 'en_gb.utf' en_GB.utf8 This makes me wonder: When i ssh into a Linux machine from my Mac, and it forwards all of my LC_* variables with that 'UTF-8' suffix, does that Linux machine even understand what is being asked of it? Or is it just falling back to some other locale? In either case, what is the mechanism behind its behaviour, and is it dependent on any particular set-up (e.g., will i see the same behaviour on a BusyBox-based system as on a GNU-based one)?

    Read the article

  • Is it possible to use different zsh menu selection behaviour for different commands?

    - by kine
    I'm using the menu select behaviour in zsh, which invokes a menu below the cursor where you can see the various possibilities. The .zshrc option i have set for this is zstyle ':completion:*' menu select=2 By default, pressing Return to select a possibility in this menu only completes the word — it does not actually send the command. For example, I might get a menu like this ~ % cd de<TAB> completing directory: [Desktop/] Development/ Pressing Return here will result in ~ % cd Desktop/ I then have to press Return a second time to actually send the command. I can modify this behaviour to make it so that pressing Return both selects the completion and sends the command by doing this bindkey -M menuselect '^M' .accept-line However, there's a problem with this: sometimes I need to complete a file or directory without sending the command. For example, I might need to do ln -s Desktop Desktop2 — with this bindkey behaviour, trying to complete Desktop will result in ln -s Desktop/ being sent as the command, and obviously I don't want that. I'm aware that just pressing space will let me get on with the command, but it's now a habit. Given this, is there a way to make it so that only some commands let you press Return once (like cd), but all other commands require pressing it twice?

    Read the article

1