Removed vimb.1.txt to process manpage direct for install target.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 29 Jul 2013 14:00:03 +0000 (16:00 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 29 Jul 2013 14:00:03 +0000 (16:00 +0200)
.gitignore
Makefile
doc/Makefile
doc/vimb.1 [new file with mode: 0644]
doc/vimb.1.txt [deleted file]

index e92aab6..32d4c57 100644 (file)
@@ -3,6 +3,5 @@
 vimb
 vimb_dbg
 *.tar.gz
-doc/*.1
 src/hints.js.h
 src/config.h
index 2f2192f..dea0043 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ include config.mk
 
 -include $(DEPS)
 
-all: $(TARGET) man
+all: $(TARGET)
 
 options:
        @echo "$(PROJECT) build options:"
@@ -41,9 +41,6 @@ $(DTARGET): $(DOBJ)
        @echo "${CC} $<"
        @$(CC) -c -o $@ $< $(CPPFLAGS) $(DFLAGS)
 
-man:
-       @$(MAKE) $(MFLAGS) -C doc man
-
 install: $(TARGET)
        install -d $(DESTDIR)$(BINDIR)
        install -m 755 $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
@@ -54,7 +51,6 @@ uninstall:
        @$(MAKE) $(MFLAGS) -C doc uninstall
 
 clean:
-       @$(MAKE) $(MFLAGS) -C doc clean
        $(RM) src/*.o src/*.do src/hints.js.h $(TARGET) $(DTARGET)
 
 dist: distclean
index e7e57fb..cc16ee6 100644 (file)
@@ -3,24 +3,13 @@ include ../config.mk
 MANDIR1 = $(MANDIR)/man1
 MAN1    = $(PROJECT).1
 
-all: man
-
-man: $(MAN1)
-
-%.1: %.1.txt
-       @echo build manual page
+install: $(MAN1)
+       install -d $(DESTDIR)$(MANDIR1)
+       @echo "install -m 644 $(MAN1) $(DESTDIR)$(MANDIR1)/$(MAN1)"
        @sed -e "s/VERSION/$(VERSION)/g" \
                -e "s/DATE/`date +'%m %Y'`/g" \
-               -e "s/PROJECT/$(PROJECT)/g" < $< > $@
-
-install: man
-       install -d $(DESTDIR)$(MANDIR1)
-       install -m 644 $(MAN1) $(DESTDIR)$(MANDIR1)/$(MAN1)
+               -e "s/PROJECT/$(PROJECT)/g" < $(MAN1) > $(DESTDIR)$(MANDIR1)/$(MAN1)
+       @chmod 644 $(DESTDIR)$(MANDIR1)/$(MAN1)
 
 uninstall:
        $(RM) $(DESTDIR)$(MANDIR1)/$(MAN1)
-
-clean:
-       $(RM) *.1
-
-.PHONY: clean
diff --git a/doc/vimb.1 b/doc/vimb.1
new file mode 100644 (file)
index 0000000..f22404e
--- /dev/null
@@ -0,0 +1,682 @@
+.\" vim: ft=groff
+.\" Process this file with
+.\" groff -man -Tascii vimb.1
+.TH PROJECT 1 "DATE" "PROJECT/VERSION" "Vimb Manual"
+
+.SH NAME
+PROJECT - Vim Browser - A modal web browser based on webkit thats inspired by
+vim the great editor.
+
+.SH SYNOPSIS
+.BI "PROJECT [" "OPTION" "] [" "URI" "]"
+
+.SH DESCRIPTION
+PROJECT is a webkit based web browser that behaves like the vimperator
+plugin for the firefox and usage paradigms from the great editor vim. The goal
+of PROJECT is to build a completely keyboard-driven, efficient and pleasurable
+browsing-experience.
+
+.SH OPTIONS
+Mandatory arguments to long options are mandatory for short options too.
+.TP
+.BI "\-c, \--config " "CONFIG-FILE"
+Use custom configuration given as \fICONFIG-FILE\fP.
+.TP
+.BI "\-e, \-\-embed " "WINID"
+.I WINID
+of an XEmbed-aware application, that PROJECT will use as its parent.
+.TP
+.B "\-h, \-\-help"
+Show help options.
+.TP
+.B "\-d, \-\-dump-config"
+Dump out the whole default configurations to stdout. This can be used to
+create a own config file in
+.I $XDG_CONFIG_HOME/PROJECT/config
+.TP
+.B "\-v, \-\-version"
+Print build and version information.
+
+.SH MODES
+PROJECT is modal an has following main modes:
+.TP
+.B Normal Mode
+The default mode. Pressing Escape always enter normal mode.
+.TP
+.B Insert Mode
+Used for editing text elements in a webpage.
+.TP
+.B Command Mode
+Execute PROJECT commands from the builtin inputbox (commandline).
+
+.SH COMMANDS
+Commands are a central part in PROJECT. They are used for nearly all things
+that could be done with this browser. Commands allow to set config variables,
+to assign keybindings and much more. Also the keybindings are only shortcut
+for the commands itself.
+
+Commands can be called in Insert Mode from the inputbox in the way like
+":[count]command[ param[=value]]". But some commands are not available in
+Command Mode and therefore not callable directly. To use them too, they must be
+bound to the keybinding.
+
+.SS Open
+.TP
+.BI "open [" URI "], o [" URI ]
+Open the give \fIURI\fP into current window. If \fIURI\fP is empty the
+configured 'home-page' is opened.
+.TP
+.BI "tabopen [" URI "], t [" URI ]
+Open the give \fIURI\fP into a new window. If \fIURI\fP is empty the
+configured 'home-page' is opened.
+.TP
+.B (tab)open-closed
+Open the last closed page.
+.TP
+.B (tab)open-clipboard, (t)oc
+Open the url from clipboard.
+
+.SS Input
+Switches the browser into Command Mode and prefill the inputbox on th bottom of
+the browser with various prefilled content.
+.TP
+.BI "input [" TEXT "], in [" TEXT ]
+Writes
+.I TEXT
+into to inputbox and switch to command mode. If no
+.I TEXT
+is given, print ':' into the inputbox.
+.TP
+.BI "inputuri [" "TEXT" "]"
+Writes
+.I TEXT\fR{URI}
+into to inputbox where {URL} is the current used url. This can be used to add
+keybindings to generate the tabopen command with current uri prefilled. If
+.I TEXT
+is not given use ':' instead.
+
+.SS Navigate
+Following commands are used to navigate within the browser history.
+.TP
+.BI [ N "]back, [" N "]ba"
+Move
+. I N
+steps back in browser history.
+.TP
+.BI [ N "]forward, [" N "]fo"
+Move \fIN\fP steps back in browser history.
+.TP
+.B reload, re
+Reload the current viewed url.
+.TP
+.B reload!, re!
+Discard any caches and reload the current viewed url.
+.TP
+.B stop, st
+Stop loading the current url.
+.TP
+.BI [ N "]descent"
+Go to the \fIN\fPth descendent directory of the current opened.
+.TP
+.B descent!
+Go to the domain of the current opened page.
+
+.SS Scroll
+Following commands are used to scroll ad jump within the current view.
+.TP
+.BI [ N "]jumpleft"
+Scrolls the current view \fIN\fP steps to the left.
+.br
+If \fIN\fP is given jump to \fIN\fR% of the page from the left.
+.TP
+.BI [ N "]jumpright"
+Scrolls the current view to the right.
+.br
+If \fIN\fP is given jump to \fIN\fP% of the page from the left.
+.TP
+.BI [ N "]jumptop"
+Scrolls the current view to the top of page.
+.br
+If \fIN\fP is given, scroll to \fIN\fR% of the page.
+.TP
+.BI [ N "]jumpbottom"
+Scrolls the current view to the end of page.
+.br
+If \fIN\fP is given, scroll to \fIN\fR% of the page.
+.TP
+.BI [ N "]pageup"
+Scroll up the page \fIN\fP screens.
+.TP
+.BI [ N "]pagedown"
+Scroll down the page \fIN\fP screens.
+.TP
+.BI [ N "]halfpageup"
+Scroll up the page \fIN\fP half screens.
+.TP
+.BI [ N "]halfpagedown"
+Scroll down the page \fIN\fP half screens.
+.TP
+.BI [ N "]scrollleft"
+Scroll the page \fIN\fP times the "scrollstep" to the left.
+.TP
+.BI [ N "]scrollright"
+Scroll the page \fIN\fP times the "scrollstep" to the right.
+.TP
+.BI [ N "]scrollup"
+Scroll the page \fIN\fP times the "scrollstep" to the top.
+.TP
+.BI [ N "]scrolldown"
+Scroll the page \fIN\fP times the "scrollstep" to the end.
+
+.SS Keybinding
+To bind a command to a key sequence use the {n,i,c}map command. To map a
+keysequence to a command, use this format "nmap {[modkey]key}={command}[ params]".
+
+The modkey is a single simple char like "g". The key can also contain
+special keys and modifiers and is given in format like "<ctrl\-o>", "<tab>",
+"<shift\-tab>", "<up>", "<right>" or also a simple char like "G".
+
+Example:
+.br
+"nmap <shift\-?>=input :foo" to write :foo into input box and switch to Command Mode.
+.br
+"cunmap <shift\-tab>" To remove this keybinding use.
+
+If a keybinding is added, for the same key-sequence like another keybinding,
+the previous keybinding will be removed.
+.TP
+.B nmap
+Add a keybinding used in Normal Mode.
+.TP
+.B imap
+Add a keybinding used in Input Mode.
+.TP
+.B cmap
+Add a keybinding used in Command Mode.
+.TP
+.B nunmap
+Remove a Normal Mode keybinding.
+.TP
+.B iunmap
+Remove a Input Mode keybinding.
+.TP
+.B cunmap
+Remove a Command Mode keybinding.
+
+.SS Hints
+The hinting is the way to do what you would do with the mouse in common
+mouse-driven browsers. Open url, yank uri, save page and so on. If the hinting
+is started, the relevant elements on the page will be marked by numbered
+labels. Hints can be selected by using <tab> or <ctrl-tab>, by typing the
+number of the label, or filtering the elements by some text that is part of
+the hinted element (like url, link text, button label) and any combination of
+this methods. If <enter> is pressed, the current active hint will be fired. If
+only one possible hint remains, this will be fired automatically.
+.TP
+Syntax: ":hint-{TYPE} [\fIQUERY\fP]"
+If \fIQUERY\fP is given, this is used to filter hints contents initially. Note
+that the \fIQUERY\fP can only be used to filter the hints by their content and
+not by their numeric hint label. On the other hand \fIQUERY\fP is the only way
+to match hints with numeric content.
+.TP
+.BI "hint-link [" QUERY "], hint-link-new [" QUERY ]
+Start hinting to open link into current or new window.
+.TP
+.BI "hint-input-open [" QUERY "], hint-input-tabopen [" QUERY ]
+Start hinting to fill the inputbox with ":open {hintedLinkUrl}" or ":tabopen
+{hintedLinkUrl}".
+.TP
+.BI "hint-yank [" QUERY ]
+Start hinting to yank the hinted link url into the primary and secondary
+clipboard.
+.TP
+.BI "hint-image-open [" QUERY "], hint-image-tabopen [" QUERY ]
+Start hinting to open images into current or new window.
+.TP
+.BI "hint-editor [" QUERY "]"
+Start hinting to open inputboxes or textareas with external editor.
+.TP
+.BI "hint-save [" QUERY "]"
+Start hinting to download hinted links into configured download directory.
+
+.SS Yank
+.TP
+.B yank-uri, yu
+Yank the current url to the primary and secondary clipboard.
+.TP
+.B yank-selection, ys
+Yank the selected text into the primary and secondary clipboard.
+
+.SS Shortcuts
+Shortcuts allows to open URL build up from a named template with additional
+parameters. If a shortcut named 'dd' is defined, you can use it with `:open dd
+list of parameters' to open the generated URL.
+
+Shortcuts are a good to use with search engines where the URL is nearly the
+same but a single parameter is user defined.
+.TP
+.BI "shortcut-add " "SHORTCUT" "=" "URI"
+Adds a shortcut with the \fISHORTCUT\fP and \fIURI\fP template. The \fIURI\fP
+can contain multiple placeholders $0-$9 that will be filled by the parameters
+given when the shortcut is called. The parameters given when the shortcut is
+called will be split into as many parameters like the highest used
+placeholder.
+
+Example 1: shortcut-add dl=https://duckduckgo.com/lite/?q=$0 to setup a
+search engine. Can be called by `:open dl my search phrase'.
+
+Example 2: shortcut-add gh=https://github.com/$0/$1 to build urls from given
+parameters. Can be called `:open gh fanglingsu vimb'.
+.TP
+.BI "shortcut-remove " "SHORTCUT"
+Remove the search engine to the given \fISHORTCUT\fP.
+.TP
+.BI "shortcut-default " "SHORTCUT"
+Set the shortcut for given \fISHORTCUT\fP as the default. It doesn't matter if
+the \fISHORTCUT\fP is already in use or not to be able to set it.
+
+.SS Configuration
+.TP
+.BI "set " VAR = VALUE
+Set configuration values named by
+.IR VAR .
+To set boolean variable you should use 'on', 'off' or 'true'
+and 'false'. Colors are given as hexadecimal value like '#f57700'.
+.TP
+.BI "set " VAR ?
+Show the current set value of variable
+.IR VAR .
+.TP
+.BI "set " VAR !
+Toggle the value of boolean variable \fIVAR\fP and display the new set value.
+
+.SS Zoom
+.TP
+.BI [ N "]zoomin, [" N "]zi"
+Zoom \fIN\fP steps in of the current page - effects only the text.
+.TP
+.BI [ N "]zoomout, [" N "]zo"
+Zoom \fIN\fP steps out of the current page - effects only the text.
+.TP
+.BI [ N "]zoominfull, [" N "]zif"
+Zoom \fIN\fP steps in of the current page - effecting all elements.
+.TP
+.BI [ N "]zoomoutfull, [" N "]zof"
+Zoom \fIN\fP steps out of the current page - effecting all elements.
+.TP
+.B zoomreset, zr
+Reset the zoomlevel to the default value.
+
+.SS History
+.TP
+.B hist-prev, hist-next"
+Prints the previous or next cammand or search query from history into
+inputbox. If there is already text in the input box this will be used to get
+history items. A command is not a internal command, but every string entered
+into inputbox that begins with \fI[:/?]\fP. So the history contains real
+commands and search queries.
+
+.SS Bookmark
+.TP
+.BI "bookmark-add [" TAGS "], bma [" TAGS ]
+Save the current opened uri with \fITAGS\fP to the bookmark file.
+.TP
+.BI "bookmark-remove [" URI "], bmr [" URI ]
+Removes all bookmarks for given \fIURI\fP or if not given the current opened
+page.
+
+.SS Misc
+.TP
+.B next, n, prev, p
+This are wrapper commands to start completion and to step through the
+completion items, or to focus previous or next hints if hinting is active.
+
+.TP
+.BI "run [" "COMMAND LIST" ]
+Run is a command, that was introduced to have the ability to run multiple
+other commands with a single call. Everything after the `run' is interpreted
+as a `|' seperated list of commands and parameters. The run command allows to
+use fancy keybindings that set several config settings with only on keypress.
+
+Format:
+":run [count]command[ param[=value]]|[count]command[ param[=value]]|..."
+
+Example:
+":run set input-bg-normal=#ff0 | set input-fg-normal=#f0f | 5pagedown"
+.TP
+.BI "shellcmd " CMD
+Runs given shell \fICMD\fP syncron and print the output into inputbox. The
+\fICMD\fP can contain multiple '%' chars that are expanded to the current
+opened uri.
+
+Example:
+`:shellcmd echo "`date` %" >> myhistory.txt'
+.TP
+.BI [ N "]search-forward [" QUERY "], [" N "]search-backward [" QUERY ]
+Search forward or backward for the \fIN\fP'th occurrence of \fIQUERY\fP in
+current page.
+.TP
+.BI [ N "]search-selection-forward, [" N "]search-selection-backward
+Search forward or backward for the \fIN\fP'th occurrence of the selected text.
+.TP
+.BI "save [" PATH "]"
+Download current opened page into configured download directory. If \fIPATH\fP
+is given, download under this file name or path. Possible value for PATH are
+`page.html', `subdir/img1.png', `~/downlod.html' or absolute pathes
+`/tmp/file.html'.
+.TP
+.B inspect
+Toggles the webinspector for current page. This is only available if the config
+"webinspector" is enabled.
+.TP
+.B quit, q
+Close the browser.
+.TP
+.B source
+Toggle between normal view and source view for the current page.
+.TP
+.BI eval " JAVASCRIPT" ", e" " JAVASCRIPT"
+Runs the given \fIJAVASCRIPT\fP in the current page and display the evaluated
+value.
+
+Example:
+":eval document.cookie"
+
+.SH COMPLETIONS
+The completions are triggered by pressing `<tab>` or `<shift-tab>` in the
+activated inputbox. Depending of the current inserted content different
+complations are started. The complation takes additional typed chars to filter
+the completion list that is shown.
+.TP
+.B commands
+The completion for commands are started when at least `:` is shown in the
+inputbox. If there are given some sore chars the completion will lookup those
+commands that starts with the given chars.
+.TP
+.B settings
+The setting name completion ist started if at least `:set ` is shown in
+inputbox and does also match settings that begins with slready typed setting
+prefix.
+.TP
+.B history
+The history of URLs is shown for the `:open ` and `:tabopen ` commands. This
+completion looks up for every given word in the history url and titles. Only
+those history items are shown, where the title or url contains all tags.
+
+Example:
+":open foo bar<tab>" will complete only URLs that contain the words foo and
+bar.
+.TP
+.B bookmarks
+The bookmark completion is similar to the history completion, but does match
+only the tags of the bookmarks. The bookmark completion ist started by `:open
+\fB!\fP` or `:tabopen \fB!\fP` and does a prefix search for all given words in
+the bookmark tags.
+
+Example:
+":open \fB!\fPfoo ba" will match all bookmark that have the tags "foo" or
+"foot" and tags starting with "ba" like "ball".
+.TP
+.B search
+The search completion allow to get a filtered list of already done searches.
+This completion starts by `/` or `?` in inputbox and performs a prefix
+comparison for further typed chars.
+
+.SH KEYBINDINGS
+If the commands used by a keybinding, the keybindings can also user together
+with a count. The count hase to typed just before the keybinding.
+
+Example:
+"25G" to got to 25% of the page.
+.TP
+.B esc
+Got back to normal mode indipendent from current mode.
+
+.SS NORMAL_MODE
+.TP
+.B g\-f
+Toggle show html source of current page.
+.TP
+.B g\-F
+Opend the Web Inspector for current page.
+.TP
+.B :
+Start command mode and print `:' to the input box.
+.TP
+.B /
+Start command mode and print `/' to inputbox to start searching forward.
+.TP
+.B ?
+Start command mode and print `?' to inputbox to start searching backward.
+.TP
+.B *
+Search forward for current selected text.
+.TP
+.B #
+Search backward for current selected text.
+.TP
+.B o
+Start command mode and print `:open ' to input box.
+.TP
+.B O
+Start command mode and print `:open CURRENT_URI' to input box.
+.TP
+.B t
+Start command mode and print `:tabopen ' to input box.
+.TP
+.B T
+Start command mode and print `:tabopen CURRENT_URI' to input box.
+.TP
+.B g\-h
+Opend the configured home-page.
+.TP
+.B g\-H
+Opend the configured home-page into new window.
+.TP
+.B u
+Open the last closed page.
+.TP
+.B U
+Open the last closed page into a new window.
+.TP
+.B ctrl\-q
+Quit the browser.
+.TP
+.BI [ N ]ctrl\-o
+Go back \fIN\fP steps in the browser history.
+.TP
+.BI [ N ]ctrl\-i
+Go forward \fIN\fP steps in the browser history.
+.TP
+.BI [ N ]gu
+Go to the \fIN\fPth descendent directory of the current opened URL.
+.TP
+.B gU
+Go to the domain of the current opened page.
+.TP
+.B r
+Reload the website.
+.TP
+.B R
+Reload the website witout using caches.
+.TP
+.B C
+Stop loading the current page.
+.TP
+.BI [ N ]ctrl\-f
+Scroll \fIN\fP pages down.
+.TP
+.BI [ N ]ctrl\-b
+Scroll \fIN\fP pages up.
+.TP
+.BI [ N ]ctrl\-d
+Scroll \fIN\fP half pages down.
+.TP
+.BI [ N ]ctrl\-u
+Scroll \fIN\fP half pages up.
+.TP
+.BI [ N ]g\-g
+Scroll to the top of the current page. Or if \fIN\fP is given to \fIN\fP% of the page.
+.TP
+.BI [ N ]G
+Scroll to the bottom of the current page. Or if \fIN\fP is given to \fIN\fP% of the page.
+.TP
+.BI [ N ]0
+Scroll \fIN\fP steps to the left of current page.
+.TP
+.BI [ N ]$
+Scroll \fIN\fP steps to the right of current page.
+.TP
+.BI [ N ]h
+Scroll \fIN\fP steps to the left of page.
+.TP
+.BI [ N ]l
+Scroll \fIN\fP steps to the right of page.
+.TP
+.BI [ N ]j
+Scroll page \fIN\fP steps down.
+.TP
+.BI [ N ]k
+Scroll page \fIN\fP steps up.
+.TP
+.B f
+Start hinting for links.
+.TP
+.B F
+Start hinting for links to open them in new window.
+.TP
+.B ;\-o
+Start hinting to build :open command with hinted source.
+.TP
+.B ;\-t
+Start hinting to build :tabopen command with hinted source.
+.TP
+.B ;\-y
+Start hinting to yank hinted element URI into clipboard.
+.TP
+.B ;\-i
+Start hinting to open images.
+.TP
+.B ;\-I
+Start hinting to open images into new window.
+.TP
+.B ;\-e
+Start hinting to open editable form fileds with external editor.
+.TP
+.B ;\-s
+Start hinting to download the linkes resource.
+.TP
+.B y
+Yank the URI or current page into clipboard.
+.TP
+.B Y
+Yank the current selection into clipboard.
+.TP
+.B p
+Open the url out of the clipboard.
+.TP
+.B P
+Open the url out of the clipboard into new window.
+.TP
+.BI [ N ]z\-i
+Zoom-In the text of the page by \fIN\fP steps.
+.TP
+.BI [ N ]z\-o
+Zoom-Out the text of the page by \fIN\fP steps.
+.TP
+.BI [ N ]z\-I
+Fullcontent Zoom-In the page by \fIN\fP steps.
+.TP
+.BI [ N ]z\-O
+Fullcontent Zoom-Out the page by \fIN\fP steps.
+.TP
+.B z\-z
+Reset Zoom.
+.TP
+.BI [ N ]n
+Search for \fIN\fPnth next search result.
+.TP
+.BI [ N ]N
+Search for \fIN\fPnth previous search result.
+
+.SS COMMAND_MODE
+.TP
+.B tab
+Complete different sources in the inputbox or if hinting is active, focus next
+hint.
+.TP
+.B shift\-tab
+Complete backward different sources in the inputbox or if hinting is active,
+focus previous hint.
+.TP
+.B up
+Step through history backward.
+.TP
+.B down
+Step through history forward.
+
+.SS INSERT_MODE
+.TP
+.B ctrl-t
+If the current active form element is an inputbox or textarea, the content is
+copied to temporary file and the file openen with the configured external
+editor (setting `editor-command').
+
+.SH FILES
+.I $XDG_CONFIG_HOME/PROJECT/config
+.RS
+Configuration file to set webkit setting, some gui styles and keybindings.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/cookies
+.RS
+Cookie store file.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/closed
+.RS
+Holds the URI of the last closed browser window.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/history
+.RS
+This file holds the history of unique opened URIs.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/command
+.RS
+This file holds the history of commands and search queries performed via input
+box.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/search
+.RS
+This file holds the history of search queries.
+box.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/bookmark
+.RS
+Holds the bookmarks saved with command `bookmark-add'.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/scripts.js
+.RS
+This file can be used to run user scripts, that are injected into every paged
+that is opened.
+.RE
+.I $XDG_CONFIG_HOME/PROJECT/style.css
+.RS
+File for userdefined css styles. These file is used if the config variable
+`stylesheet' is enabled.
+.RE
+
+.SH ENVIRONMENT
+.TP
+.B HOME
+If this is set and not empty this will be used to get the path of the home
+directory. If not set the entry out of the passwd file will be used instead.
+.TP
+.B http_proxy
+If this variable is set to an none empty value, and the configuration option
+`proxy' is enabled, this will be used as http proxy.
+
+.SH "REPORTING BUGS"
+Report bugs to the main project page on
+.IR https://github.com/fanglingsu/vimb/issues .
+
+.SH AUTHOR
+Daniel Carl
diff --git a/doc/vimb.1.txt b/doc/vimb.1.txt
deleted file mode 100644 (file)
index f22404e..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-.\" vim: ft=groff
-.\" Process this file with
-.\" groff -man -Tascii vimb.1
-.TH PROJECT 1 "DATE" "PROJECT/VERSION" "Vimb Manual"
-
-.SH NAME
-PROJECT - Vim Browser - A modal web browser based on webkit thats inspired by
-vim the great editor.
-
-.SH SYNOPSIS
-.BI "PROJECT [" "OPTION" "] [" "URI" "]"
-
-.SH DESCRIPTION
-PROJECT is a webkit based web browser that behaves like the vimperator
-plugin for the firefox and usage paradigms from the great editor vim. The goal
-of PROJECT is to build a completely keyboard-driven, efficient and pleasurable
-browsing-experience.
-
-.SH OPTIONS
-Mandatory arguments to long options are mandatory for short options too.
-.TP
-.BI "\-c, \--config " "CONFIG-FILE"
-Use custom configuration given as \fICONFIG-FILE\fP.
-.TP
-.BI "\-e, \-\-embed " "WINID"
-.I WINID
-of an XEmbed-aware application, that PROJECT will use as its parent.
-.TP
-.B "\-h, \-\-help"
-Show help options.
-.TP
-.B "\-d, \-\-dump-config"
-Dump out the whole default configurations to stdout. This can be used to
-create a own config file in
-.I $XDG_CONFIG_HOME/PROJECT/config
-.TP
-.B "\-v, \-\-version"
-Print build and version information.
-
-.SH MODES
-PROJECT is modal an has following main modes:
-.TP
-.B Normal Mode
-The default mode. Pressing Escape always enter normal mode.
-.TP
-.B Insert Mode
-Used for editing text elements in a webpage.
-.TP
-.B Command Mode
-Execute PROJECT commands from the builtin inputbox (commandline).
-
-.SH COMMANDS
-Commands are a central part in PROJECT. They are used for nearly all things
-that could be done with this browser. Commands allow to set config variables,
-to assign keybindings and much more. Also the keybindings are only shortcut
-for the commands itself.
-
-Commands can be called in Insert Mode from the inputbox in the way like
-":[count]command[ param[=value]]". But some commands are not available in
-Command Mode and therefore not callable directly. To use them too, they must be
-bound to the keybinding.
-
-.SS Open
-.TP
-.BI "open [" URI "], o [" URI ]
-Open the give \fIURI\fP into current window. If \fIURI\fP is empty the
-configured 'home-page' is opened.
-.TP
-.BI "tabopen [" URI "], t [" URI ]
-Open the give \fIURI\fP into a new window. If \fIURI\fP is empty the
-configured 'home-page' is opened.
-.TP
-.B (tab)open-closed
-Open the last closed page.
-.TP
-.B (tab)open-clipboard, (t)oc
-Open the url from clipboard.
-
-.SS Input
-Switches the browser into Command Mode and prefill the inputbox on th bottom of
-the browser with various prefilled content.
-.TP
-.BI "input [" TEXT "], in [" TEXT ]
-Writes
-.I TEXT
-into to inputbox and switch to command mode. If no
-.I TEXT
-is given, print ':' into the inputbox.
-.TP
-.BI "inputuri [" "TEXT" "]"
-Writes
-.I TEXT\fR{URI}
-into to inputbox where {URL} is the current used url. This can be used to add
-keybindings to generate the tabopen command with current uri prefilled. If
-.I TEXT
-is not given use ':' instead.
-
-.SS Navigate
-Following commands are used to navigate within the browser history.
-.TP
-.BI [ N "]back, [" N "]ba"
-Move
-. I N
-steps back in browser history.
-.TP
-.BI [ N "]forward, [" N "]fo"
-Move \fIN\fP steps back in browser history.
-.TP
-.B reload, re
-Reload the current viewed url.
-.TP
-.B reload!, re!
-Discard any caches and reload the current viewed url.
-.TP
-.B stop, st
-Stop loading the current url.
-.TP
-.BI [ N "]descent"
-Go to the \fIN\fPth descendent directory of the current opened.
-.TP
-.B descent!
-Go to the domain of the current opened page.
-
-.SS Scroll
-Following commands are used to scroll ad jump within the current view.
-.TP
-.BI [ N "]jumpleft"
-Scrolls the current view \fIN\fP steps to the left.
-.br
-If \fIN\fP is given jump to \fIN\fR% of the page from the left.
-.TP
-.BI [ N "]jumpright"
-Scrolls the current view to the right.
-.br
-If \fIN\fP is given jump to \fIN\fP% of the page from the left.
-.TP
-.BI [ N "]jumptop"
-Scrolls the current view to the top of page.
-.br
-If \fIN\fP is given, scroll to \fIN\fR% of the page.
-.TP
-.BI [ N "]jumpbottom"
-Scrolls the current view to the end of page.
-.br
-If \fIN\fP is given, scroll to \fIN\fR% of the page.
-.TP
-.BI [ N "]pageup"
-Scroll up the page \fIN\fP screens.
-.TP
-.BI [ N "]pagedown"
-Scroll down the page \fIN\fP screens.
-.TP
-.BI [ N "]halfpageup"
-Scroll up the page \fIN\fP half screens.
-.TP
-.BI [ N "]halfpagedown"
-Scroll down the page \fIN\fP half screens.
-.TP
-.BI [ N "]scrollleft"
-Scroll the page \fIN\fP times the "scrollstep" to the left.
-.TP
-.BI [ N "]scrollright"
-Scroll the page \fIN\fP times the "scrollstep" to the right.
-.TP
-.BI [ N "]scrollup"
-Scroll the page \fIN\fP times the "scrollstep" to the top.
-.TP
-.BI [ N "]scrolldown"
-Scroll the page \fIN\fP times the "scrollstep" to the end.
-
-.SS Keybinding
-To bind a command to a key sequence use the {n,i,c}map command. To map a
-keysequence to a command, use this format "nmap {[modkey]key}={command}[ params]".
-
-The modkey is a single simple char like "g". The key can also contain
-special keys and modifiers and is given in format like "<ctrl\-o>", "<tab>",
-"<shift\-tab>", "<up>", "<right>" or also a simple char like "G".
-
-Example:
-.br
-"nmap <shift\-?>=input :foo" to write :foo into input box and switch to Command Mode.
-.br
-"cunmap <shift\-tab>" To remove this keybinding use.
-
-If a keybinding is added, for the same key-sequence like another keybinding,
-the previous keybinding will be removed.
-.TP
-.B nmap
-Add a keybinding used in Normal Mode.
-.TP
-.B imap
-Add a keybinding used in Input Mode.
-.TP
-.B cmap
-Add a keybinding used in Command Mode.
-.TP
-.B nunmap
-Remove a Normal Mode keybinding.
-.TP
-.B iunmap
-Remove a Input Mode keybinding.
-.TP
-.B cunmap
-Remove a Command Mode keybinding.
-
-.SS Hints
-The hinting is the way to do what you would do with the mouse in common
-mouse-driven browsers. Open url, yank uri, save page and so on. If the hinting
-is started, the relevant elements on the page will be marked by numbered
-labels. Hints can be selected by using <tab> or <ctrl-tab>, by typing the
-number of the label, or filtering the elements by some text that is part of
-the hinted element (like url, link text, button label) and any combination of
-this methods. If <enter> is pressed, the current active hint will be fired. If
-only one possible hint remains, this will be fired automatically.
-.TP
-Syntax: ":hint-{TYPE} [\fIQUERY\fP]"
-If \fIQUERY\fP is given, this is used to filter hints contents initially. Note
-that the \fIQUERY\fP can only be used to filter the hints by their content and
-not by their numeric hint label. On the other hand \fIQUERY\fP is the only way
-to match hints with numeric content.
-.TP
-.BI "hint-link [" QUERY "], hint-link-new [" QUERY ]
-Start hinting to open link into current or new window.
-.TP
-.BI "hint-input-open [" QUERY "], hint-input-tabopen [" QUERY ]
-Start hinting to fill the inputbox with ":open {hintedLinkUrl}" or ":tabopen
-{hintedLinkUrl}".
-.TP
-.BI "hint-yank [" QUERY ]
-Start hinting to yank the hinted link url into the primary and secondary
-clipboard.
-.TP
-.BI "hint-image-open [" QUERY "], hint-image-tabopen [" QUERY ]
-Start hinting to open images into current or new window.
-.TP
-.BI "hint-editor [" QUERY "]"
-Start hinting to open inputboxes or textareas with external editor.
-.TP
-.BI "hint-save [" QUERY "]"
-Start hinting to download hinted links into configured download directory.
-
-.SS Yank
-.TP
-.B yank-uri, yu
-Yank the current url to the primary and secondary clipboard.
-.TP
-.B yank-selection, ys
-Yank the selected text into the primary and secondary clipboard.
-
-.SS Shortcuts
-Shortcuts allows to open URL build up from a named template with additional
-parameters. If a shortcut named 'dd' is defined, you can use it with `:open dd
-list of parameters' to open the generated URL.
-
-Shortcuts are a good to use with search engines where the URL is nearly the
-same but a single parameter is user defined.
-.TP
-.BI "shortcut-add " "SHORTCUT" "=" "URI"
-Adds a shortcut with the \fISHORTCUT\fP and \fIURI\fP template. The \fIURI\fP
-can contain multiple placeholders $0-$9 that will be filled by the parameters
-given when the shortcut is called. The parameters given when the shortcut is
-called will be split into as many parameters like the highest used
-placeholder.
-
-Example 1: shortcut-add dl=https://duckduckgo.com/lite/?q=$0 to setup a
-search engine. Can be called by `:open dl my search phrase'.
-
-Example 2: shortcut-add gh=https://github.com/$0/$1 to build urls from given
-parameters. Can be called `:open gh fanglingsu vimb'.
-.TP
-.BI "shortcut-remove " "SHORTCUT"
-Remove the search engine to the given \fISHORTCUT\fP.
-.TP
-.BI "shortcut-default " "SHORTCUT"
-Set the shortcut for given \fISHORTCUT\fP as the default. It doesn't matter if
-the \fISHORTCUT\fP is already in use or not to be able to set it.
-
-.SS Configuration
-.TP
-.BI "set " VAR = VALUE
-Set configuration values named by
-.IR VAR .
-To set boolean variable you should use 'on', 'off' or 'true'
-and 'false'. Colors are given as hexadecimal value like '#f57700'.
-.TP
-.BI "set " VAR ?
-Show the current set value of variable
-.IR VAR .
-.TP
-.BI "set " VAR !
-Toggle the value of boolean variable \fIVAR\fP and display the new set value.
-
-.SS Zoom
-.TP
-.BI [ N "]zoomin, [" N "]zi"
-Zoom \fIN\fP steps in of the current page - effects only the text.
-.TP
-.BI [ N "]zoomout, [" N "]zo"
-Zoom \fIN\fP steps out of the current page - effects only the text.
-.TP
-.BI [ N "]zoominfull, [" N "]zif"
-Zoom \fIN\fP steps in of the current page - effecting all elements.
-.TP
-.BI [ N "]zoomoutfull, [" N "]zof"
-Zoom \fIN\fP steps out of the current page - effecting all elements.
-.TP
-.B zoomreset, zr
-Reset the zoomlevel to the default value.
-
-.SS History
-.TP
-.B hist-prev, hist-next"
-Prints the previous or next cammand or search query from history into
-inputbox. If there is already text in the input box this will be used to get
-history items. A command is not a internal command, but every string entered
-into inputbox that begins with \fI[:/?]\fP. So the history contains real
-commands and search queries.
-
-.SS Bookmark
-.TP
-.BI "bookmark-add [" TAGS "], bma [" TAGS ]
-Save the current opened uri with \fITAGS\fP to the bookmark file.
-.TP
-.BI "bookmark-remove [" URI "], bmr [" URI ]
-Removes all bookmarks for given \fIURI\fP or if not given the current opened
-page.
-
-.SS Misc
-.TP
-.B next, n, prev, p
-This are wrapper commands to start completion and to step through the
-completion items, or to focus previous or next hints if hinting is active.
-
-.TP
-.BI "run [" "COMMAND LIST" ]
-Run is a command, that was introduced to have the ability to run multiple
-other commands with a single call. Everything after the `run' is interpreted
-as a `|' seperated list of commands and parameters. The run command allows to
-use fancy keybindings that set several config settings with only on keypress.
-
-Format:
-":run [count]command[ param[=value]]|[count]command[ param[=value]]|..."
-
-Example:
-":run set input-bg-normal=#ff0 | set input-fg-normal=#f0f | 5pagedown"
-.TP
-.BI "shellcmd " CMD
-Runs given shell \fICMD\fP syncron and print the output into inputbox. The
-\fICMD\fP can contain multiple '%' chars that are expanded to the current
-opened uri.
-
-Example:
-`:shellcmd echo "`date` %" >> myhistory.txt'
-.TP
-.BI [ N "]search-forward [" QUERY "], [" N "]search-backward [" QUERY ]
-Search forward or backward for the \fIN\fP'th occurrence of \fIQUERY\fP in
-current page.
-.TP
-.BI [ N "]search-selection-forward, [" N "]search-selection-backward
-Search forward or backward for the \fIN\fP'th occurrence of the selected text.
-.TP
-.BI "save [" PATH "]"
-Download current opened page into configured download directory. If \fIPATH\fP
-is given, download under this file name or path. Possible value for PATH are
-`page.html', `subdir/img1.png', `~/downlod.html' or absolute pathes
-`/tmp/file.html'.
-.TP
-.B inspect
-Toggles the webinspector for current page. This is only available if the config
-"webinspector" is enabled.
-.TP
-.B quit, q
-Close the browser.
-.TP
-.B source
-Toggle between normal view and source view for the current page.
-.TP
-.BI eval " JAVASCRIPT" ", e" " JAVASCRIPT"
-Runs the given \fIJAVASCRIPT\fP in the current page and display the evaluated
-value.
-
-Example:
-":eval document.cookie"
-
-.SH COMPLETIONS
-The completions are triggered by pressing `<tab>` or `<shift-tab>` in the
-activated inputbox. Depending of the current inserted content different
-complations are started. The complation takes additional typed chars to filter
-the completion list that is shown.
-.TP
-.B commands
-The completion for commands are started when at least `:` is shown in the
-inputbox. If there are given some sore chars the completion will lookup those
-commands that starts with the given chars.
-.TP
-.B settings
-The setting name completion ist started if at least `:set ` is shown in
-inputbox and does also match settings that begins with slready typed setting
-prefix.
-.TP
-.B history
-The history of URLs is shown for the `:open ` and `:tabopen ` commands. This
-completion looks up for every given word in the history url and titles. Only
-those history items are shown, where the title or url contains all tags.
-
-Example:
-":open foo bar<tab>" will complete only URLs that contain the words foo and
-bar.
-.TP
-.B bookmarks
-The bookmark completion is similar to the history completion, but does match
-only the tags of the bookmarks. The bookmark completion ist started by `:open
-\fB!\fP` or `:tabopen \fB!\fP` and does a prefix search for all given words in
-the bookmark tags.
-
-Example:
-":open \fB!\fPfoo ba" will match all bookmark that have the tags "foo" or
-"foot" and tags starting with "ba" like "ball".
-.TP
-.B search
-The search completion allow to get a filtered list of already done searches.
-This completion starts by `/` or `?` in inputbox and performs a prefix
-comparison for further typed chars.
-
-.SH KEYBINDINGS
-If the commands used by a keybinding, the keybindings can also user together
-with a count. The count hase to typed just before the keybinding.
-
-Example:
-"25G" to got to 25% of the page.
-.TP
-.B esc
-Got back to normal mode indipendent from current mode.
-
-.SS NORMAL_MODE
-.TP
-.B g\-f
-Toggle show html source of current page.
-.TP
-.B g\-F
-Opend the Web Inspector for current page.
-.TP
-.B :
-Start command mode and print `:' to the input box.
-.TP
-.B /
-Start command mode and print `/' to inputbox to start searching forward.
-.TP
-.B ?
-Start command mode and print `?' to inputbox to start searching backward.
-.TP
-.B *
-Search forward for current selected text.
-.TP
-.B #
-Search backward for current selected text.
-.TP
-.B o
-Start command mode and print `:open ' to input box.
-.TP
-.B O
-Start command mode and print `:open CURRENT_URI' to input box.
-.TP
-.B t
-Start command mode and print `:tabopen ' to input box.
-.TP
-.B T
-Start command mode and print `:tabopen CURRENT_URI' to input box.
-.TP
-.B g\-h
-Opend the configured home-page.
-.TP
-.B g\-H
-Opend the configured home-page into new window.
-.TP
-.B u
-Open the last closed page.
-.TP
-.B U
-Open the last closed page into a new window.
-.TP
-.B ctrl\-q
-Quit the browser.
-.TP
-.BI [ N ]ctrl\-o
-Go back \fIN\fP steps in the browser history.
-.TP
-.BI [ N ]ctrl\-i
-Go forward \fIN\fP steps in the browser history.
-.TP
-.BI [ N ]gu
-Go to the \fIN\fPth descendent directory of the current opened URL.
-.TP
-.B gU
-Go to the domain of the current opened page.
-.TP
-.B r
-Reload the website.
-.TP
-.B R
-Reload the website witout using caches.
-.TP
-.B C
-Stop loading the current page.
-.TP
-.BI [ N ]ctrl\-f
-Scroll \fIN\fP pages down.
-.TP
-.BI [ N ]ctrl\-b
-Scroll \fIN\fP pages up.
-.TP
-.BI [ N ]ctrl\-d
-Scroll \fIN\fP half pages down.
-.TP
-.BI [ N ]ctrl\-u
-Scroll \fIN\fP half pages up.
-.TP
-.BI [ N ]g\-g
-Scroll to the top of the current page. Or if \fIN\fP is given to \fIN\fP% of the page.
-.TP
-.BI [ N ]G
-Scroll to the bottom of the current page. Or if \fIN\fP is given to \fIN\fP% of the page.
-.TP
-.BI [ N ]0
-Scroll \fIN\fP steps to the left of current page.
-.TP
-.BI [ N ]$
-Scroll \fIN\fP steps to the right of current page.
-.TP
-.BI [ N ]h
-Scroll \fIN\fP steps to the left of page.
-.TP
-.BI [ N ]l
-Scroll \fIN\fP steps to the right of page.
-.TP
-.BI [ N ]j
-Scroll page \fIN\fP steps down.
-.TP
-.BI [ N ]k
-Scroll page \fIN\fP steps up.
-.TP
-.B f
-Start hinting for links.
-.TP
-.B F
-Start hinting for links to open them in new window.
-.TP
-.B ;\-o
-Start hinting to build :open command with hinted source.
-.TP
-.B ;\-t
-Start hinting to build :tabopen command with hinted source.
-.TP
-.B ;\-y
-Start hinting to yank hinted element URI into clipboard.
-.TP
-.B ;\-i
-Start hinting to open images.
-.TP
-.B ;\-I
-Start hinting to open images into new window.
-.TP
-.B ;\-e
-Start hinting to open editable form fileds with external editor.
-.TP
-.B ;\-s
-Start hinting to download the linkes resource.
-.TP
-.B y
-Yank the URI or current page into clipboard.
-.TP
-.B Y
-Yank the current selection into clipboard.
-.TP
-.B p
-Open the url out of the clipboard.
-.TP
-.B P
-Open the url out of the clipboard into new window.
-.TP
-.BI [ N ]z\-i
-Zoom-In the text of the page by \fIN\fP steps.
-.TP
-.BI [ N ]z\-o
-Zoom-Out the text of the page by \fIN\fP steps.
-.TP
-.BI [ N ]z\-I
-Fullcontent Zoom-In the page by \fIN\fP steps.
-.TP
-.BI [ N ]z\-O
-Fullcontent Zoom-Out the page by \fIN\fP steps.
-.TP
-.B z\-z
-Reset Zoom.
-.TP
-.BI [ N ]n
-Search for \fIN\fPnth next search result.
-.TP
-.BI [ N ]N
-Search for \fIN\fPnth previous search result.
-
-.SS COMMAND_MODE
-.TP
-.B tab
-Complete different sources in the inputbox or if hinting is active, focus next
-hint.
-.TP
-.B shift\-tab
-Complete backward different sources in the inputbox or if hinting is active,
-focus previous hint.
-.TP
-.B up
-Step through history backward.
-.TP
-.B down
-Step through history forward.
-
-.SS INSERT_MODE
-.TP
-.B ctrl-t
-If the current active form element is an inputbox or textarea, the content is
-copied to temporary file and the file openen with the configured external
-editor (setting `editor-command').
-
-.SH FILES
-.I $XDG_CONFIG_HOME/PROJECT/config
-.RS
-Configuration file to set webkit setting, some gui styles and keybindings.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/cookies
-.RS
-Cookie store file.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/closed
-.RS
-Holds the URI of the last closed browser window.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/history
-.RS
-This file holds the history of unique opened URIs.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/command
-.RS
-This file holds the history of commands and search queries performed via input
-box.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/search
-.RS
-This file holds the history of search queries.
-box.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/bookmark
-.RS
-Holds the bookmarks saved with command `bookmark-add'.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/scripts.js
-.RS
-This file can be used to run user scripts, that are injected into every paged
-that is opened.
-.RE
-.I $XDG_CONFIG_HOME/PROJECT/style.css
-.RS
-File for userdefined css styles. These file is used if the config variable
-`stylesheet' is enabled.
-.RE
-
-.SH ENVIRONMENT
-.TP
-.B HOME
-If this is set and not empty this will be used to get the path of the home
-directory. If not set the entry out of the passwd file will be used instead.
-.TP
-.B http_proxy
-If this variable is set to an none empty value, and the configuration option
-`proxy' is enabled, this will be used as http proxy.
-
-.SH "REPORTING BUGS"
-Report bugs to the main project page on
-.IR https://github.com/fanglingsu/vimb/issues .
-
-.SH AUTHOR
-Daniel Carl