Skip to content

Commit ff2033c

Browse files
committed
aesthetics
1 parent 8e4ae69 commit ff2033c

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

runtime/plugins/comment/comment.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ end
9090

9191
function commentLine(bp, lineN, indentLen)
9292
local line = bp.Buf:Line(lineN)
93+
local commentType = bp.Buf.Settings["commenttype"]
94+
local indent = string.sub(line, 1, indentLen)
9395
local trimmedLine = string.sub(line, indentLen + 1)
9496
trimmedLine = trimmedLine:gsub("%%", "%%%%")
95-
local indent = string.sub(line, 1, indentLen)
96-
local commentType = bp.Buf.Settings["commenttype"]
9797
local commentedLine = commentType:gsub("%%s", trimmedLine)
9898
bp.Buf:Replace(buffer.Loc(0, lineN), buffer.Loc(#line, lineN), indent .. commentedLine)
9999
end
@@ -208,5 +208,3 @@ function init()
208208
config.TryBindKey("CtrlUnderscore", "lua:comment.comment", false)
209209
config.AddRuntimeFile("comment", config.RTHelp, "help/comment.md")
210210
end
211-
212-
-- So if im just writting, what finger do i use th e most to input spaces. Funnily engouh, I mostly use the right hand do do that, and not my left hand at all. That's quite insteresting. Altough iut must be said, I've been looking at how my hands moving while typing, and ids anything but efficient :( But oh well. it only goes to show how ineficient typing on a regular key board can be :/

runtime/plugins/comment/help/comment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ the binding:
1919
> comment
2020
```
2121

22-
If you have a selection of text, or multiple cursors, the plugin will comment all the selected lines.
22+
If you have a selection of text, or multiple cursors, the plugin
23+
will comment all the selected lines.
2324

2425
The comment type will be auto detected based on the filetype,
2526
but it is only available for certain filetypes:

0 commit comments

Comments
 (0)