I hereby claim:
- I am ultim8k on github.
- I am ultim8k (https://keybase.io/ultim8k) on keybase.
- I have a public key ASD2xPoCw-slPy8L8t8FO8LQIlPQMnvzKcAWiF3GVMjXKwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
>Jarvis, do me a favor and blow Mark 42 Galaxy Note 7
From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim
For those tasks I use most of the time block selection.
Put your cursor on the first #
character, press Ctrl``V
(or Ctrl``Q
for gVim), and go down until the last commented line and press x
, that will delete all the #
characters vertically.
For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V
, and select until the last line. Second, press Shift``I``#``Esc
(then give it a second), and it will insert a #
character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/#
in the second step instead.
<!DOCTYPE html> | |
<html lang="en" class="-capitalise-normal"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>An amazing site</title> | |
<style> | |
@media (max-width: 480px) { | |
.page-title { |
function giveLater (num) { | |
return new Promise (function (resolve, reject) { | |
setTimeout(function () { | |
if (num) { | |
resolve(num); | |
return false; | |
} | |
reject('num is empty'); |
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = true |
/* | |
User's sublime-keymap | |
*/ | |
[ | |
{"keys": ["super+t"], "command": "new_file"}, | |
{"keys": ["super+shift+c"], "command": "insert_snippet", "args": {"contents": "console.log(${1:$TM_SELECTED_TEXT});${0}"}} | |
] |
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true |