Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 13.0

Bug Fixes
---------
- OutlookVim globally set the textwidth for Vim if g:outlook_textwidth is defined, instead of setting the textwidth for the specific email buffer opened when editing an email.  The textwidth for the buffer will only be set if g:outlook_textwidth is set and > 0 (Antonis Loumiotis).
  • Loading branch information...
commit e8b387a0d6991d47ac4e7b4ec185a2b9200cf166 1 parent 29d55e2
@dfishburn dfishburn authored committed
View
21 doc/outlook.txt
@@ -1,4 +1,4 @@
-*outlook.txt* For Vim version 7.0. Last change: 2013 Sep 06
+*outlook.txt* For Vim version 7.0. Last change: 2013 Sep 27
VIM REFERENCE MANUAL
@@ -6,7 +6,7 @@
David Fishburn <dfishburn dot vim at gmail dot com>
Outlook Vim Plugin
- outlook.vim version 12.0
+ outlook.vim version 13.0
For instructions on installing this file, type
:help add-local-help
@@ -79,6 +79,16 @@ Homepage: http://www.vim.org/scripts/script.php?script_id=3087
+Version 13.0 (September 28, 2013)
+
+ Bug Fixes
+ ---------
+ - OutlookVim globally set the textwidth for Vim if g:outlook_textwidth
+ is defined, instead of setting the textwidth for the specific email buffer
+ opened when editing an email. The textwidth for the buffer will only be
+ set if g:outlook_textwidth is set and > 0 (Antonis Loumiotis).
+
+
Version 12.0 (September 6, 2013)
New Features
@@ -497,8 +507,11 @@ Version 1.0 (May 7, 2010)
would like: >
let g:outlook_file_type = 'anything_you_like'
<
- This setting (default = 1) overrides the default textwidth the mail ftplugin sets. This
- allows you to automatically format text using gq by setting the following: >
+ If needed, this setting allows you to override the default textwidth for the
+ filetype chosen for your email. By creating this variable each new email
+ opened in Vim will set a local buffer option to this value. This will
+ allow you to automatically format text using gq. If this variable
+ = 0, changing the buffer specific textwidth is abandoned: >
let g:outlook_textwidth = 76
<
When you save a file, by default, Outlook will be updated and the temporary
View
15 plugin/OutlookVim.bas
@@ -1,8 +1,8 @@
' OutlookVim.bas - Edit emails using Vim from Outlook
' ---------------------------------------------------------------
-' Version: 12.0
+' Version: 13.0
' Authors: David Fishburn <dfishburn dot vim at gmail dot com>
-' Last Modified: 2013 Aug 30
+' Last Modified: 2013 Sep 27
' Homepage: http://www.vim.org/scripts/script.php?script_id=3087
'
' This VBScript should be installed as a macro inside of Microsoft Outlook.
@@ -46,6 +46,8 @@
Option Explicit
+Private Const OUTLOOK_VIM_VERSION = 13
+
Private Type STARTUPINFO
cb As Long
lpReserved As String
@@ -154,7 +156,7 @@ Private Sub VimEdit(item As Outlook.MailItem)
Dim fso, tempfile, tfolder, tname, tfile, cfile, entryID, appRef, x, index
Dim body As String, bodyFormat As String, msg As String
- Dim outlookVBVersion As String, outlookVimVersion As String
+ Dim outlookVimVersion As String
Dim startAt, allOccurrences
Dim Vim, vimKeys, vimResponse, vimServerName, vimEncoding, vimOLEInstance
Dim overwrite As Boolean, debugMode As Boolean
@@ -175,7 +177,6 @@ Private Sub VimEdit(item As Outlook.MailItem)
debugMode = False
startAt = 1
allOccurrences = -1
- outlookVBVersion = "12"
' MsgBox ("Just starting LaunchVim")
' MsgBox ("type:" & TypeName(item))
@@ -226,13 +227,13 @@ Private Sub VimEdit(item As Outlook.MailItem)
If vimResponse > 0 Then
debugMode = True
Call ShowMsg("OutlookVim: Enabling debug mode against Vim instance[" & vimOLEInstance & _
- "] VB version[" & outlookVBVersion & _
+ "] VB version[" & OUTLOOK_VIM_VERSION & _
"] Vim version[" & outlookVimVersion & "]" _
, debugMode)
End If
- If outlookVimVersion <> outlookVBVersion Then
- MsgBox "OutlookVim: The OutlookVim VB script version[" & outlookVBVersion & _
+ If outlookVimVersion <> OUTLOOK_VIM_VERSION Then
+ MsgBox "OutlookVim: The OutlookVim VB script version[" & OUTLOOK_VIM_VERSION & _
"] differs from the Vim OutlookVim plugin version[" & outlookVimVersion & _
"] please ensure all versions are the same.", _
vbCritical
View
17 plugin/outlook.vim
@@ -1,8 +1,8 @@
" outlook.vim - Edit emails using Vim from Outlook
" ---------------------------------------------------------------
-" Version: 12.0
+" Version: 13.0
" Authors: David Fishburn <dfishburn dot vim at gmail dot com>
-" Last Modified: 2013 Sep 04
+" Last Modified: 2013 Sep 25
" Created: 2009 Jan 17
" Homepage: http://www.vim.org/scripts/script.php?script_id=3087
" Help: :h outlook.txt
@@ -60,13 +60,6 @@ if !exists('g:outlook_javascript')
let g:outlook_javascript = expand('<sfile>:p:h').'/outlookvim.js'
endif
-" textwidth - automatically wrap at a column
-if exists('g:outlook_textwidth')
- let &textwidth = g:outlook_textwidth
-else
- let &textwidth = 76
-endif
-
" servername - Choose which Vim server instance to edit the email with
if !exists('g:outlook_servername')
let g:outlook_servername = ''
@@ -170,6 +163,10 @@ function! Outlook_EditFile(filename, encoding, bodyFormat)
endif
endif
+ if exists('g:outlook_textwidth') && g:outlook_textwidth != 0
+ let &l:textwidth = g:outlook_textwidth
+ endif
+
if g:outlook_debug == 1
call s:Outlook_WarningMsg( 'Outlook_EditFile after edit bufnr['.bufnr('%').'] file['.a:filename.'] bodyFormat['.b:outlook_body_format.']' )
endif
@@ -420,7 +417,7 @@ if has('autocmd') && !exists("g:loaded_outlook")
augroup END
" Don't re-run the script if already sourced
- let g:loaded_outlook = 12
+ let g:loaded_outlook = 13
let @"=saveB
endif
View
6 plugin/outlookvim.js
@@ -1,8 +1,8 @@
// outlookvim.js
//
// Author: David Fishburn
-// Version: 12.0
-// Last Modified: 2013 Aug 28
+// Version: 13.0
+// Last Modified: 2013 Sep 25
// Homepage: http://www.vim.org/scripts/script.php?script_id=3087
//
// Purpose:
@@ -31,7 +31,7 @@
// http://stackoverflow.com/questions/12247696/open-outlook-with-javascript-for-sending-mail-with-attachment-in-c-sharp
var objArgs = WScript.Arguments;
-var version = 12;
+var version = 13;
function updateOutlook( emailfile, persistfiles, bodyformat )
{
Please sign in to comment.
Something went wrong with that request. Please try again.