the nullest blog

Techrants

Archive for the 'Linux' Category

Problem with arrow keys and tab in Vim 7 on Cygwin

I experienced some problem with the arrow keys on Cygwin. In insert mode, pressing the arrow keys just inserted a new line and some random character (which probably wasn’t random but had some meaning - anyway,  that character  didn’t say anything to me). Furthermore, the tab didn’t work as I was used to in the Windows version of VIM. More precisely, I couldn’t use tab completion on commands in command line mode (I think shift-Tab worked though, but this is much too unorthodox for me). So, what’s this all about? Well, the problem could easily be rectified by copying an example .vimrc file to my home directory:

cp /usr/share/vim/vim71/vimrc_example.vim ~/.vimrc

The problem disappeared.

No comments

How do I get a list of all directories in a folder and all its subfolders?

For some reason I needed to get a list of all directories recursively and here is the solution:

On Windows based system, type:

>dir /S /AD /B

  • /S makes it search recursively
  • /AD only list directories
  • /B no leading/trailing information

If you can use the unix based tool find you may prefer

$find -type d

where d stands for directory.

No comments

Next Page »