Skip to content

Commit

Permalink
Use == instead of pasting whitespace from below
Browse files Browse the repository at this point in the history
  • Loading branch information
Aharris88 committed Aug 26, 2015
1 parent 509e938 commit d587bd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin/consolation.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function! Consolate()
:execute "normal! Oconsole.log();\<esc>hP"
:execute "normal! j0v^hyk0P"
:execute "normal! =="
endfunction
command! -nargs=0 Consolate :call Consolate()

Expand Down
8 changes: 6 additions & 2 deletions t/tests.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ describe 'Consolate'

it 'indents correctly'
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
normal! gg>>wyiw
new
put! = '}'
put! = ' var a = 5;'
put! = 'function() {'
normal! ggjwwyiw
Expect getreg('"') == 'a'

execute "normal! :Consolate\<cr>"
Expect getline(1) == ' console.log(a);'
Expect getline(2) == ' console.log(a);'
end
end

0 comments on commit d587bd6

Please sign in to comment.