Skip to content

Commit 91844ea

Browse files
Fritz Mehnervim-scripts
authored andcommitted
Version 3.9
- Hotkey renamed: \st -> \su - New global variable allows loading menus only with filetype 'sh'. - Comments: echo "<line>" escapes double quotes in original text. - Other minor bugs fixed.
1 parent b68e420 commit 91844ea

File tree

10 files changed

+128
-79
lines changed

10 files changed

+128
-79
lines changed

README.bashsupport

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
README for bash-support.vim (Version 3.8) / November 18 2011
1+
README for bash-support.vim (Version 3.9) / December 27 2011
22

33
* INSTALLATION
44
* RELEASE NOTES
@@ -136,18 +136,11 @@ Look at the bashsupport help with
136136
+-----------------------------------------------+
137137

138138
=======================================================================================
139-
RELEASE NOTES FOR VERSION 3.8
139+
RELEASE NOTES FOR VERSION 3.9
140140
=======================================================================================
141-
- New comment submenu 'script sections'.
142-
- Two new hotkeys \css, \ckc for commenting.
143-
- Two new plugin tags: LICENSE,ORGANIZATION
144-
- Run menu: new item 'Bash cmd. line arg.' (\rba).
145-
- I/O-Redir-menu: additional item'>&2'
146-
- System-wide installation: minimal Template file for a user will automatically
147-
be added.
148-
- Hotkey renamed: \t -> \t1
149-
- A few code snippets for debugging added.
150-
- Bugfix: \cl did not work in insert mode.
141+
- Hotkey renamed: \st -> \su
142+
- New global variable allows loading menus only with filetype 'sh'.
143+
- Comments: echo "<line>" escapes double quotes in original text.
151144
- Other minor bugs fixed.
152145

153146
=======================================================================================

bash-support/codesnippets/_debug_function renamed to bash-support/codesnippets/_debug_function.noindent

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
DEBUG=1 # debugging on (0) / off (1)
2+
DEBUG=${DEBUG:-0} # 0 = no debug output, 1 = show debug output,
3+
# or enable debug with: DEBUG=1 script.sh
34

45
#=== FUNCTION ================================================================
56
# NAME: _debug

bash-support/codesnippets/_debug_timestamp renamed to bash-support/codesnippets/_debug_timestamp.noindent

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
DEBUG=1 # debugging on (0) / off (1)
2+
DEBUG=${DEBUG:-0} # 0 = no debug output, 1 = show debug output,
3+
# or enable debug with: DEBUG=1 script.sh
34

45
#=== FUNCTION ================================================================
56
# NAME: _debug_timestamp

bash-support/templates/bash.comments.template

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
#!/bin/bash -
2020
#===============================================================================
2121
#
22-
# FILE: |FILENAME|
22+
# FILE: |FILENAME|
2323
#
24-
# USAGE: ./|FILENAME|
24+
# USAGE: ./|FILENAME|
2525
#
26-
# DESCRIPTION:
26+
# DESCRIPTION:
2727
#
28-
# OPTIONS: ---
29-
# REQUIREMENTS: ---
30-
# BUGS: ---
31-
# NOTES: ---
28+
# OPTIONS: ---
29+
# REQUIREMENTS: ---
30+
# BUGS: ---
31+
# NOTES: ---
3232
# AUTHOR: |AUTHOR| (|AUTHORREF|), |EMAIL|
3333
# ORGANIZATION: |ORGANIZATION|
3434
# CREATED: |DATE| |TIME|

doc/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
=======================================================================================
2+
RELEASE NOTES FOR VERSION 3.8
3+
=======================================================================================
4+
- New comment submenu 'script sections'.
5+
- Two new hotkeys \css, \ckc for commenting.
6+
- Two new plugin tags: LICENSE,ORGANIZATION
7+
- Run menu: new item 'Bash cmd. line arg.' (\rba).
8+
- I/O-Redir-menu: additional item'>&2'
9+
- System-wide installation: minimal Template file for a user will automatically
10+
be added.
11+
- Hotkey renamed: \t -> \t1
12+
- A few code snippets for debugging added.
13+
- Bugfix: \cl did not work in insert mode.
14+
- Other minor bugs fixed.
15+
116
=======================================================================================
217
RELEASE NOTES FOR VERSION 3.7
318
=======================================================================================

doc/bash-hot-keys.pdf

-103 Bytes
Binary file not shown.

doc/bash-hot-keys.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
99
%% Copyright: Copyright (C) 2003-2010 Dr.-Ing. Fritz Mehner ([email protected])
1010
%% Version: see PluginVersion (below)
11-
%% Revision: $Id: bash-hot-keys.tex,v 1.37 2011/11/02 17:34:09 mehner Exp $
11+
%% Revision: $Id: bash-hot-keys.tex,v 1.39 2011/12/27 12:22:08 mehner Exp $
1212
%% Created: 09.06.2003
1313
%%
1414
%% Notes:
1515
%%
1616
%%=====================================================================================
1717

18-
\newcommand{\PluginVersion}{3.8}
19-
\newcommand{\ReleaseDate}{November 2011}
18+
\newcommand{\PluginVersion}{3.9}
19+
\newcommand{\ReleaseDate}{December 2011}
2020
\newcommand{\Rep}{{\scriptsize{[n]}}}
2121

2222
\documentclass[oneside,11pt,a4paper,DIV18]{scrartcl}
@@ -116,7 +116,7 @@
116116
\hline \verb'\si' & \verb'if then fi' \hfill (n, i, v)\\
117117
\hline \verb'\sie' & \verb'if then else fi' \hfill (n, i, v)\\
118118
\hline \verb'\ss' & \verb'select in do done' \hfill (n, i, v)\\
119-
\hline \verb'\st' & \verb'until do done' \hfill (n, i, v)\\
119+
\hline \verb'\su' & \verb'until do done' \hfill (n, i, v)\\
120120
\hline \verb'\sw' & \verb'while do done' \hfill (n, i, v)\\
121121
\hline \verb'\sfu' & \verb'function' \hfill (n, i, v)\\
122122
\hline \verb'\se' & \verb'echo -e ""' \hfill (n, i, v)\\

doc/bashsupport.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
*bashsupport.txt* Bash Support November 18 2011
1+
*bashsupport.txt* Bash Support December 3 2011
22

33
bash Support *bash-support* *bashsupport*
4-
Plugin version 3.8
4+
Plugin version 3.9
55
for Vim version 7.0 and above
66
Fritz Mehner <[email protected]>
77

@@ -731,7 +731,7 @@ Legend: (i) insert mode, (n) normal mode, (v) visual mode
731731
\si if then fi (n, i, v)
732732
\sie if then else fi (n, i, v)
733733
\ss select in do done (n, i, v)
734-
\st until do done (n, i, v)
734+
\su until do done (n, i, v)
735735
\sw while do done (n, i, v)
736736
\sfu function (n, i, v)
737737
\se echo -e "..." (n, i, v)
@@ -893,6 +893,7 @@ g:BASH_Ctrl_j 'on'
893893
g:BASH_CodeSnippets $HOME.'/.vim/bash-support/codesnippets' (Linux/U**X)
894894
$VIM.'\vimfiles\bash-support/codesnippets/' (Windows)
895895
g:BASH_LoadMenus 'yes'
896+
g:BASH_CreateMenusDelayed 'no'
896897
g:BASH_Dictionary_File $HOME."/.vim/bash-support/wordlists/bash.list"
897898
g:BASH_Root 'B&ash.'
898899
g:BASH_MenuHeader 'yes'
@@ -927,6 +928,7 @@ g:BASH_AlsoBash ''
927928
2. group: g:BASH_CodeSnippets : The name of the code snippet directory
928929
(see |bashsupport-stat-snippets|).
929930
g:BASH_LoadMenus : Load menus and mappings ("yes", "no") at start up.
931+
g:BASH_CreateMenusDelayed : Load menus only with filetype 'sh'
930932
g:BASH_Dictionary_File : Path and file name of the bash word list used for
931933
dictionary completion (see |bashsupport-dictionary|).
932934
g:BASH_Root : The name of the root menu entry of this plugin

ftplugin/sh.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Language : bash
44
" Plugin : bash-support.vim
55
" Maintainer : Fritz Mehner <[email protected]>
6-
" Revision : $Id: sh.vim,v 1.45 2011/11/02 17:30:12 mehner Exp $
6+
" Revision : $Id: sh.vim,v 1.47 2011/12/24 12:23:49 mehner Exp $
77
"
88
" -----------------------------------------------------------------
99
"
@@ -132,10 +132,10 @@ inoremap <buffer> <silent> <LocalLeader>ckw <C-C>$:call BASH_InsertTempla
132132
inoremap <buffer> <silent> <LocalLeader>cko <C-C>$:call BASH_InsertTemplate("comment.keyword-workaround")<CR>
133133
inoremap <buffer> <silent> <LocalLeader>ckn <C-C>$:call BASH_InsertTemplate("comment.keyword-keyword") <CR>
134134
135-
noremap <buffer> <silent> <LocalLeader>ce ^iecho<Space>"<End>"<Esc>j'
136-
inoremap <buffer> <silent> <LocalLeader>ce <C-C>^iecho<Space>"<End>"<Esc>j'
137-
noremap <buffer> <silent> <LocalLeader>cr 0:s/^\s*echo\s\+\"// \| s/\s*\"\s*$// \| :normal ==<CR>j'
138-
inoremap <buffer> <silent> <LocalLeader>cr <C-C>0:s/^\s*echo\s\+\"// \| s/\s*\"\s*$// \| :normal ==<CR>j'
135+
noremap <buffer> <silent> <LocalLeader>ce :call BASH_echo_comment()<CR>j'
136+
inoremap <buffer> <silent> <LocalLeader>ce <C-C>:call BASH_echo_comment()<CR>j'
137+
noremap <buffer> <silent> <LocalLeader>cr :call BASH_remove_echo()<CR>j'
138+
inoremap <buffer> <silent> <LocalLeader>cr <C-C>:call BASH_remove_echo()<CR>j'
139139
noremap <buffer> <silent> <LocalLeader>cv :call BASH_CommentVimModeline()<CR>
140140
inoremap <buffer> <silent> <LocalLeader>cv <C-C>:call BASH_CommentVimModeline()<CR>
141141
"
@@ -153,7 +153,7 @@ inoremap <buffer> <LocalLeader>ckc <Esc>:KeywordComment<Space>
153153
noremap <buffer> <silent> <LocalLeader>si :call BASH_InsertTemplate("statements.if")<CR>
154154
noremap <buffer> <silent> <LocalLeader>sie :call BASH_InsertTemplate("statements.if-else")<CR>
155155
noremap <buffer> <silent> <LocalLeader>ss :call BASH_InsertTemplate("statements.select")<CR>
156-
noremap <buffer> <silent> <LocalLeader>st :call BASH_InsertTemplate("statements.until")<CR>
156+
noremap <buffer> <silent> <LocalLeader>su :call BASH_InsertTemplate("statements.until")<CR>
157157
noremap <buffer> <silent> <LocalLeader>sw :call BASH_InsertTemplate("statements.while")<CR>
158158
159159
inoremap <buffer> <silent> <LocalLeader>sc <Esc>:call BASH_InsertTemplate("statements.case")<CR>
@@ -163,15 +163,15 @@ inoremap <buffer> <silent> <LocalLeader>sfo <Esc>:call BASH_InsertTemplat
163163
inoremap <buffer> <silent> <LocalLeader>si <Esc>:call BASH_InsertTemplate("statements.if")<CR>
164164
inoremap <buffer> <silent> <LocalLeader>sie <Esc>:call BASH_InsertTemplate("statements.if-else")<CR>
165165
inoremap <buffer> <silent> <LocalLeader>ss <Esc>:call BASH_InsertTemplate("statements.select")<CR>
166-
inoremap <buffer> <silent> <LocalLeader>st <Esc>:call BASH_InsertTemplate("statements.until")<CR>
166+
inoremap <buffer> <silent> <LocalLeader>su <Esc>:call BASH_InsertTemplate("statements.until")<CR>
167167
inoremap <buffer> <silent> <LocalLeader>sw <Esc>:call BASH_InsertTemplate("statements.while")<CR>
168168
169169
vnoremap <buffer> <silent> <LocalLeader>sf <Esc>:call BASH_InsertTemplate("statements.for-in", "v")<CR>
170170
vnoremap <buffer> <silent> <LocalLeader>sfo <Esc>:call BASH_InsertTemplate("statements.for", "v")<CR>
171171
vnoremap <buffer> <silent> <LocalLeader>si <Esc>:call BASH_InsertTemplate("statements.if", "v")<CR>
172172
vnoremap <buffer> <silent> <LocalLeader>sie <Esc>:call BASH_InsertTemplate("statements.if-else", "v")<CR>
173173
vnoremap <buffer> <silent> <LocalLeader>ss <Esc>:call BASH_InsertTemplate("statements.select", "v")<CR>
174-
vnoremap <buffer> <silent> <LocalLeader>st <Esc>:call BASH_InsertTemplate("statements.until", "v")<CR>
174+
vnoremap <buffer> <silent> <LocalLeader>su <Esc>:call BASH_InsertTemplate("statements.until", "v")<CR>
175175
vnoremap <buffer> <silent> <LocalLeader>sw <Esc>:call BASH_InsertTemplate("statements.while", "v")<CR>
176176
177177
noremap <buffer> <silent> <LocalLeader>sfu :call BASH_InsertTemplate("statements.function")<CR>

0 commit comments

Comments
 (0)