This oneliner gets all the 'modified' files in your git repository, and opens all of them in vim. Very handy when you're starting to work in the morning and you simply want to review your modified files before committing them. Maybe there are better ways to do that (and maybe integrated in vim and/or git, who knows), but I found quicker to do this oneliner.
vim can open ssh/sftp and ftp connections for file editing using 'netrw'. If no path or file is provided vim opens the directory as a filelist. See: :help netrw.
Opens all files in the index (modified plus not added yet) in tabs in vim.
Prints line numbers making it easier to see long lines that wrap in your terminal and extra line breaks at the end of a file. :set nu works too. Show Sample Output
The equivalent of opening each file in vim and doing gg=G:wq . Bufdo makes it faster by obviating the need to start vim for each file separately.
Works even with spaces in filenames. As an alias in .gitconfig: [alias] editchanged = "!git status --porcelain | sed -ne 's/^ M //p' | tr '\\n' '\\0' | tr -d '\"' | xargs -0 vim"
Instead of using clipboard register after opening vim we can use this command in order to edit clipboard content. For those who already have "xclip -i -selection clipboard -o" aliased to pbpaste it is yet more simple, just: alias vcb='pbpaste | vim -'
deletes to the end of the buffer Show Sample Output
Whereas ^V is CTRL-V. converts a dos file to unix by removing 0x13 characters Show Sample Output
needs no GNU tools, as far as I see it
Make sure that find does not touch anything other than regular files, and handles non-standard characters in filenames while passing to xargs.
For vi(m) users : Add it in your ~/.bashrc Add an "exit" @ the end if you are masochist ;) Show Sample Output
a brief list of very common special characters in Dutch. Usefull for formatting Word source to html.
1. Get name of task by task=$(basename "$(pwd)") 2. Check whether "$task.c" exists as a file 3. open "$task.c", "$task.in", "task.out" in vim with such layout. ------------------------------- | | $task.in | | | | |$task.c |-----------------| | | $task.out | | | | -------------------------------
you should choose proper color to make comments invisible.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: