mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Code beautification
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
" recipients.
|
||||
"
|
||||
" Section: Plugin header {{{1
|
||||
if v:version < 700
|
||||
if (v:version < 700)
|
||||
echohl ErrorMsg | echo 'plugin gnupg.vim requires Vim version >= 7.0' | echohl None
|
||||
finish
|
||||
endif
|
||||
@@ -187,7 +187,7 @@ function s:GPGInit()
|
||||
" don't use tty in gvim
|
||||
" FIXME find a better way to avoid an error.
|
||||
" with this solution only --use-agent will work
|
||||
if has("gui_running")
|
||||
if (has("gui_running"))
|
||||
let s:GPGCommand = s:GPGCommand . " --no-tty"
|
||||
endif
|
||||
|
||||
@@ -345,7 +345,7 @@ function s:GPGEncrypt()
|
||||
call s:GPGDebug(2, "saved window view " . string(s:GPGWindowView))
|
||||
|
||||
" store encoding and switch to a safe one
|
||||
if &fileencoding != &encoding
|
||||
if (&fileencoding != &encoding)
|
||||
let s:GPGEncoding = &encoding
|
||||
let &encoding = &fileencoding
|
||||
call s:GPGDebug(2, "encoding was \"" . s:GPGEncoding . "\", switched to \"" . &encoding . "\"")
|
||||
@@ -450,7 +450,7 @@ function s:GPGEncryptPost()
|
||||
set nobin
|
||||
|
||||
" restore encoding
|
||||
if s:GPGEncoding != ""
|
||||
if (s:GPGEncoding != "")
|
||||
let &encoding = s:GPGEncoding
|
||||
call s:GPGDebug(2, "restored encoding \"" . &encoding . "\"")
|
||||
endif
|
||||
@@ -882,7 +882,7 @@ function s:GPGNameToID(name)
|
||||
|
||||
" when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8,
|
||||
" so convert it, if necessary
|
||||
if &encoding != "utf-8"
|
||||
if (&encoding != "utf-8")
|
||||
let output = iconv(output, "utf-8", &encoding)
|
||||
endif
|
||||
let lines = split(output, "\n")
|
||||
@@ -950,7 +950,7 @@ function s:GPGIDToName(identity)
|
||||
|
||||
" when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8,
|
||||
" so convert it, if necessary
|
||||
if &encoding != "utf-8"
|
||||
if (&encoding != "utf-8")
|
||||
let output = iconv(output, "utf-8", &encoding)
|
||||
endif
|
||||
let lines = split(output, "\n")
|
||||
@@ -991,7 +991,7 @@ command! GPGEditRecipients call s:GPGEditRecipients()
|
||||
command! GPGViewOptions call s:GPGViewOptions()
|
||||
command! GPGEditOptions call s:GPGEditOptions()
|
||||
" Section: Menu {{{1
|
||||
if has("menu")
|
||||
if (has("menu"))
|
||||
amenu <silent> Plugin.GnuPG.View\ Recipients :GPGViewRecipients<CR>
|
||||
amenu <silent> Plugin.GnuPG.Edit\ Recipients :GPGEditRecipients<CR>
|
||||
amenu <silent> Plugin.GnuPG.View\ Options :GPGViewOptions<CR>
|
||||
|
||||
Reference in New Issue
Block a user