1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 18:27:57 +01:00

added modelines everywhere

This commit is contained in:
Martin Stubenschrott
2007-04-19 16:09:14 +00:00
parent 6fb4a01aae
commit ac6a066df4
10 changed files with 76 additions and 26 deletions

View File

@@ -1,6 +1,9 @@
<pre> <pre>
date: date:
* version 0.4 * version 0.4
* gh goes home :) gH in a new tab
* :open! bypasses cache
* :buffer and :buffers support (patch from Lars Kindler)
* added :edit, :e and :tabedit aliases for :open, :tabopen * added :edit, :e and :tabedit aliases for :open, :tabopen
* settings can now be changed with += and -= like in vim (patch from Виктор Кожухаров) * settings can now be changed with += and -= like in vim (patch from Виктор Кожухаров)
* Support for space/shift-space/alt-left/alt-right keys without beeping * Support for space/shift-space/alt-left/alt-right keys without beeping

View File

@@ -3,4 +3,7 @@
Also if you want the amount or email address or whatever listet, send me an email. Also if you want the amount or email address or whatever listet, send me an email.
* Andrew Pantyukhin * Andrew Pantyukhin
* Ben Klemens
I want to say a big <b>THANK YOU</b> for all people which supported this project in this way.
</pre> </pre>

9
TODO
View File

@@ -27,26 +27,22 @@ FEATURES:
7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo() 7 whereever possible: get rid of dialogs and ask console-like dialog questions or write error prompts directly on the webpage or with :echo()
7 :hardcopy -> printing 7 :hardcopy -> printing
7 Ctrl-6/Ctrl-^ -> jump to the previously active tab 7 Ctrl-6/Ctrl-^ -> jump to the previously active tab
7 :b[uffer] <name> should switch to a buffer/tab
:b[uffer] - show buffers, if argument is number, switch to this tab, if url, open tab with this url
buffer Switching also after pressing 'b' and typing _any_ part of the buffer name?
7 3d should delete 3 tabs 7 3d should delete 3 tabs
6 :map commands to keys 6 :map commands to keys
6 autocommands (BrowserStart, BrowserQuit, TabClose, TabOpen, TabChanged, PageLoaded, any more?) 6 autocommands (BrowserStart, BrowserQuit, TabClose, TabOpen, TabChanged, PageLoaded, any more?)
6 vim like mappings for caret mode and textboxes (i to start caret mode?) 6 vim like mappings for caret mode and textboxes (i to start caret mode?)
6 pipe selected text/link/website to an external command 6 pipe selected text/link/website to an external command
6 macros (qq) 6 macros (qq)
6 :ls - show buffers
6 support firefox search engines, or at least make our search enginges user configurable 6 support firefox search engines, or at least make our search enginges user configurable
6 gf = view source? 6 gf = view source?
6 make a real one-tab-mode, divert _all_ other targets, possible by setting a firefox option (set popup=0-3) 6 make a real one-tab-mode, divert _all_ other targets, possible by setting a firefox option (set popup=0-3)
6 Shift-Insert in textboxes pastes clipboard contents 6 Shift-Insert in textboxes pastes selection contents
6 page info support (ctrl-g, g<C-g>)
5 Use arrow keys in preview window 5 Use arrow keys in preview window
5 Sort :open completion by date? 5 Sort :open completion by date?
5 make use of the ] and [ keys to e.g. jump to the next heading ]], next image ]i, previous textbox [t and so on 5 make use of the ] and [ keys to e.g. jump to the next heading ]], next image ]i, previous textbox [t and so on
5 add tag support to adding/deleting bookmarks 5 add tag support to adding/deleting bookmarks
4 Support multiple top-level windows? 4 Support multiple top-level windows?
4 :restart command to restart firefox
3 Splitting Windows with [:sp :vsp ctrl-w,s ctrl-w,v] and closing with [ctrl-w,q], moving with [ctrl-w,w or tab] 3 Splitting Windows with [:sp :vsp ctrl-w,s ctrl-w,v] and closing with [ctrl-w,q], moving with [ctrl-w,w or tab]
have a look into the split browser extension have a look into the split browser extension
3 :set should also set about:config options (with autocomplete) 3 :set should also set about:config options (with autocomplete)
@@ -54,4 +50,5 @@ FEATURES:
RANDOM IDEAS: RANDOM IDEAS:
* numbered tabs * numbered tabs
* make hints work with usermode * make hints work with usermode
* https://addons.mozilla.org/en-US/firefox/addon/4125 - use vim to edit text fields
</pre> </pre>

View File

@@ -151,3 +151,4 @@ function parseBookmarkString(str, res)
return true; return true;
} }
// vim: set fdm=marker sw=4 ts=4:

View File

@@ -93,7 +93,7 @@ var g_commands = [/*{{{*/
function(filter) { return get_bookmark_completions(filter); } function(filter) { return get_bookmark_completions(filter); }
], ],
[ [
["buffer", "bu"], ["buffer", "b"],
"Go to buffer number n. Full completion works.", "Go to buffer number n. Full completion works.",
null, null,
function (args) { tab_go(args.split(":")[0]); preview_window.hidden = true; }, function (args) { tab_go(args.split(":")[0]); preview_window.hidden = true; },
@@ -103,7 +103,7 @@ var g_commands = [/*{{{*/
["buffers", "files", "ls"], ["buffers", "files", "ls"],
"Shows a list of all buffers.", "Shows a list of all buffers.",
null, null,
function (args) {bushow("");}, function (args) {bushow("", false);},
null null
], ],
[ [
@@ -198,8 +198,21 @@ var g_commands = [/*{{{*/
" <li>Passed directly to Firefox in all other cases (<code>:open www.osnews.com | www.slashdot.org</code> will open OSNews in the current, and Slashdot in a new background tab).</li></ol>"+ " <li>Passed directly to Firefox in all other cases (<code>:open www.osnews.com | www.slashdot.org</code> will open OSNews in the current, and Slashdot in a new background tab).</li></ol>"+
"You WILL be able to use <code>:open [-T \"linux\"] torvalds&lt;Tab&gt;</code> to complete bookmarks with tag \"linux\" and which contain \"torvalds\". Note that -T support is only available for tab completion, not for the actual command.<br>"+ "You WILL be able to use <code>:open [-T \"linux\"] torvalds&lt;Tab&gt;</code> to complete bookmarks with tag \"linux\" and which contain \"torvalds\". Note that -T support is only available for tab completion, not for the actual command.<br>"+
"The items which are completed on <code>&lt;Tab&gt;</code> are specified in the <code>'complete'</code> option.<br>"+ "The items which are completed on <code>&lt;Tab&gt;</code> are specified in the <code>'complete'</code> option.<br>"+
"Without argument, reloads the current page.", "Without argument, reloads the current page.<br>"+
function(args) { if(args.length > 0) openURLs(args); else reload(false); }, "Without argument but with !, reloads the current page skipping the cache.",
function(args, special)
{
if(args.length > 0)
openURLs(args);
else
{
if (special)
BrowserReloadSkipCache();
else
BrowserReload();
}
},
function(filter) { return get_url_completions(filter); } function(filter) { return get_url_completions(filter); }
], ],
[ [
@@ -373,7 +386,7 @@ var g_mappings = [/*{{{*/
["b"], ["b"],
"Open a prompt to switch buffers", "Open a prompt to switch buffers",
"Typing the corresponding number opens switches to this buffer", "Typing the corresponding number opens switches to this buffer",
function (args) { bushow(""); openVimperatorBar('buffer '); } function (args) { bushow("", true); openVimperatorBar('buffer '); }
], ],
[ [
["d"], ["d"],
@@ -394,6 +407,18 @@ var g_mappings = [/*{{{*/
"This mapping is for debugging purposes, and may be removed in future.", "This mapping is for debugging purposes, and may be removed in future.",
function(count) { openVimperatorBar('execute '); } function(count) { openVimperatorBar('execute '); }
], ],
[
["gh"],
"Go home",
"Opens the homepage in the current tab.",
function(count) { BrowserHome(); }
],
[
["gH"],
"Go home in a new tab",
"Opens the homepage in a new tab.",
function(count) { openURLsInNewTab("", true); BrowserHome(); }
],
[ [
["gP"], ["gP"],
"Open (put) an URL based on the current Clipboard contents in a new buffer", "Open (put) an URL based on the current Clipboard contents in a new buffer",
@@ -1117,7 +1142,7 @@ function bmshow(filter, fullmode)
openURLsInNewTab("chrome://browser/content/bookmarks/bookmarksPanel.xul", true); openURLsInNewTab("chrome://browser/content/bookmarks/bookmarksPanel.xul", true);
else else
{ {
items = get_bookmark_completions(filter); var items = get_bookmark_completions(filter);
preview_window_fill(items); preview_window_fill(items);
preview_window.hidden = false; preview_window.hidden = false;
} }
@@ -1128,17 +1153,26 @@ function hsshow(filter, fullmode)
openURLsInNewTab("chrome://browser/content/history/history-panel.xul", true); openURLsInNewTab("chrome://browser/content/history/history-panel.xul", true);
else else
{ {
items = get_history_completions(filter); var items = get_history_completions(filter);
preview_window_fill(items); preview_window_fill(items);
preview_window.hidden = false; preview_window.hidden = false;
} }
} }
function bushow(filter) function bushow(filter, in_comp_window)
{ {
items = get_buffer_completions(filter); if (in_comp_window) // fill the completion list
{
g_completions = get_buffer_completions(filter);
completion_fill_list(0);
completion_show_list();
}
else // in the preview window
{
var items = get_buffer_completions(filter);
preview_window_fill(items); preview_window_fill(items);
preview_window.hidden = false; preview_window.hidden = false;
} }
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@@ -1856,4 +1890,4 @@ function removeMode(mode)
// return 0; // return 0;
// } // }
// vim: set fdm=marker : // vim: set fdm=marker sw=4 ts=4:

View File

@@ -428,6 +428,8 @@ function get_buffer_completions(filter)
var reg = new RegExp("^"+filter,"i"); var reg = new RegExp("^"+filter,"i");
items = new Array(); items = new Array();
var num = getBrowser().browsers.length; var num = getBrowser().browsers.length;
var title, url;
for(var i=0; i<num;i++) for(var i=0; i<num;i++)
{ {
try try
@@ -441,10 +443,11 @@ function get_buffer_completions(filter)
if (title == "") if (title == "")
title = "(Untitled)"; title = "(Untitled)";
if(title.search(reg) != -1) url = getBrowser().getBrowserAtIndex(i).contentDocument.location.href;
if(title.search(reg) != -1 || url.search(reg) != -1)
{ {
var title; items.push([(i+1)+": "+title, url]);
items.push([(i+1)+": "+title]);
} }
} }
return items; return items;
@@ -510,4 +513,5 @@ function preview_window_select(event)
else else
return false; return false;
} }
// vim: set fdm=marker :
// vim: set fdm=marker sw=4 ts=4:

View File

@@ -638,3 +638,5 @@ function hit_a_hint()
} }
var hah = new hit_a_hint(); var hah = new hit_a_hint();
// vim: set fdm=marker sw=4 ts=4:

View File

@@ -355,4 +355,4 @@ function set_showtabline(value)
} }
} }
// vim: set fdm=marker : // vim: set fdm=marker sw=4 ts=4:

View File

@@ -5,11 +5,13 @@
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.6 // !_TAG_PROGRAM_VERSION 5.6 //
addBookmark bookmarks.js /^function addBookmark(title, uri)$/;" f addBookmark bookmarks.js /^function addBookmark(title, uri)$/;" f
addMode commands.js /^function addMode(mode)$/;" f
add_to_command_history completion.js /^function add_to_command_history(str)$/;" f add_to_command_history completion.js /^function add_to_command_history(str)$/;" f
beep commands.js /^function beep()$/;" f beep commands.js /^function beep()$/;" f
bmadd commands.js /^function bmadd(str)$/;" f bmadd commands.js /^function bmadd(str)$/;" f
bmdel commands.js /^function bmdel(str)$/;" f bmdel commands.js /^function bmdel(str)$/;" f
bmshow commands.js /^function bmshow(filter, fullmode)$/;" f bmshow commands.js /^function bmshow(filter, fullmode)$/;" f
bushow commands.js /^function bushow(filter)$/;" f
changeHintFocus hints.js /^ function changeHintFocus(linkNumString, oldLinkNumString)$/;" f changeHintFocus hints.js /^ function changeHintFocus(linkNumString, oldLinkNumString)$/;" f
completion_add_to_list completion.js /^function completion_add_to_list(completion_item, at_beginning)\/*{{{*\/$/;" f completion_add_to_list completion.js /^function completion_add_to_list(completion_item, at_beginning)\/*{{{*\/$/;" f
completion_fill_list completion.js /^function completion_fill_list(startindex)\/*{{{*\/$/;" f completion_fill_list completion.js /^function completion_fill_list(startindex)\/*{{{*\/$/;" f
@@ -38,6 +40,7 @@ getLinkNodes vimperator.js /^function getLinkNodes(doc)$/;" f
getPageLinkNodes vimperator.js /^function getPageLinkNodes()$/;" f getPageLinkNodes vimperator.js /^function getPageLinkNodes()$/;" f
getProperty bookmarks.js /^function getProperty( aInput, aArc, DS )$/;" f getProperty bookmarks.js /^function getProperty( aInput, aArc, DS )$/;" f
get_bookmark_completions completion.js /^function get_bookmark_completions(filter)\/*{{{*\/$/;" f get_bookmark_completions completion.js /^function get_bookmark_completions(filter)\/*{{{*\/$/;" f
get_buffer_completions completion.js /^function get_buffer_completions(filter)$/;" f
get_command commands.js /^function get_command(cmd) \/\/ {{{$/;" f get_command commands.js /^function get_command(cmd) \/\/ {{{$/;" f
get_command_completions completion.js /^function get_command_completions(filter)\/*{{{*\/$/;" f get_command_completions completion.js /^function get_command_completions(filter)\/*{{{*\/$/;" f
get_firefox_pref settings.js /^function get_firefox_pref(name, default_value)$/;" f get_firefox_pref settings.js /^function get_firefox_pref(name, default_value)$/;" f
@@ -49,6 +52,7 @@ get_settings_completions completion.js /^function get_settings_completions(filte
get_url_completions completion.js /^function get_url_completions(filter)\/*{{{*\/$/;" f get_url_completions completion.js /^function get_url_completions(filter)\/*{{{*\/$/;" f
get_url_mark commands.js /^function get_url_mark(mark)$/;" f get_url_mark commands.js /^function get_url_mark(mark)$/;" f
goUp commands.js /^function goUp() \/\/ FIXME$/;" f goUp commands.js /^function goUp() \/\/ FIXME$/;" f
hasMode commands.js /^function hasMode(mode)$/;" f
help commands.js /^function help(section)$/;" f help commands.js /^function help(section)$/;" f
hit_a_hint hints.js /^function hit_a_hint()$/;" f hit_a_hint hints.js /^function hit_a_hint()$/;" f
hsshow commands.js /^function hsshow(filter, fullmode)$/;" f hsshow commands.js /^function hsshow(filter, fullmode)$/;" f
@@ -62,7 +66,6 @@ logMessage vimperator.js /^function logMessage(msg)$/;" f
makeHelpString commands.js /^ function makeHelpString(commands, color, beg, end, func)$/;" f makeHelpString commands.js /^ function makeHelpString(commands, color, beg, end, func)$/;" f
makeSettingsHelpString commands.js /^ function makeSettingsHelpString(command)$/;" f makeSettingsHelpString commands.js /^ function makeSettingsHelpString(command)$/;" f
nsBrowserStatusHandler vimperator.js /^function nsBrowserStatusHandler() \/*{{{*\/$/;" f nsBrowserStatusHandler vimperator.js /^function nsBrowserStatusHandler() \/*{{{*\/$/;" f
onBlur vimperator.js /^function onBlur() \/\/ FIXME: needed?$/;" f
onCommandBarInput vimperator.js /^function onCommandBarInput(event)$/;" f onCommandBarInput vimperator.js /^function onCommandBarInput(event)$/;" f
onCommandBarKeypress vimperator.js /^function onCommandBarKeypress(evt)\/*{{{*\/$/;" f onCommandBarKeypress vimperator.js /^function onCommandBarKeypress(evt)\/*{{{*\/$/;" f
onEscape vimperator.js /^function onEscape()$/;" f onEscape vimperator.js /^function onEscape()$/;" f
@@ -78,11 +81,14 @@ preview_window_select completion.js /^function preview_window_select(event)$/;"
quit commands.js /^function quit(save_session)$/;" f quit commands.js /^function quit(save_session)$/;" f
reload commands.js /^function reload(all_tabs)$/;" f reload commands.js /^function reload(all_tabs)$/;" f
removeHints hints.js /^ function removeHints(win)$/;" f removeHints hints.js /^ function removeHints(win)$/;" f
removeMode commands.js /^function removeMode(mode)$/;" f
restart commands.js /^function restart()$/;" f
save_history completion.js /^function save_history()$/;" f save_history completion.js /^function save_history()$/;" f
scrollBufferAbsolute commands.js /^function scrollBufferAbsolute(horizontal, vertical)$/;" f scrollBufferAbsolute commands.js /^function scrollBufferAbsolute(horizontal, vertical)$/;" f
scrollBufferRelative commands.js /^function scrollBufferRelative(right, down)$/;" f scrollBufferRelative commands.js /^function scrollBufferRelative(right, down)$/;" f
selectInput commands.js /^function selectInput()$/;" f selectInput commands.js /^function selectInput()$/;" f
set commands.js /^function set(args, special)$/;" f set commands.js /^function set(args, special)$/;" f
setCurrentMode commands.js /^function setCurrentMode(mode)$/;" f
setHintStyle hints.js /^ function setHintStyle(hintElem, styleString)$/;" f setHintStyle hints.js /^ function setHintStyle(hintElem, styleString)$/;" f
setMouseOverElement hints.js /^ function setMouseOverElement(elem)$/;" f setMouseOverElement hints.js /^ function setMouseOverElement(elem)$/;" f
setStatusbarColor vimperator.js /^function setStatusbarColor(color)$/;" f setStatusbarColor vimperator.js /^function setStatusbarColor(color)$/;" f

View File

@@ -1010,4 +1010,4 @@ function getLinkNodes(doc)
return links; return links;
} }
// vim: set fdm=marker : // vim: set fdm=marker sw=4 ts=4: