Convert Figma logo to code with AI

1995eaton logochromium-vim

Vim bindings for Google Chrome.

2,256
326
2,256
327

Top Related Projects

22,991

The hacker's browser.

A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.

Map your keys for web surfing, expand your browser with javascript and keyboard.

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar

Vimperator

Quick Overview

The 1995eaton/chromium-vim repository is a set of Vim configuration files and plugins designed to enhance the Vim text editor's integration with the Chromium web browser. It aims to provide a seamless workflow for developers who use both Vim and Chromium.

Pros

  • Tight Chromium Integration: The project provides a range of features that allow Vim users to interact with Chromium directly from within the Vim editor, such as opening URLs, inspecting elements, and more.
  • Improved Productivity: By integrating Vim and Chromium, developers can streamline their development workflow and reduce context switching between the two tools.
  • Customizable Configuration: The project allows users to customize the Vim configuration to suit their individual preferences and needs.
  • Active Development: The project is actively maintained, with regular updates and bug fixes.

Cons

  • Chromium-specific: The project is tailored specifically for Chromium, which may limit its usefulness for developers who primarily use other web browsers.
  • Potential Compatibility Issues: As both Vim and Chromium are constantly evolving, there may be occasional compatibility issues that require troubleshooting or workarounds.
  • Learning Curve: Integrating Vim and Chromium may have a steeper learning curve for developers who are not already familiar with both tools.
  • Dependency on Chromium: The project's functionality is heavily dependent on the availability and stability of the Chromium web browser, which could be a potential point of failure.

Code Examples

N/A (This is not a code library)

Getting Started

N/A (This is not a code library)

Competitor Comparisons

22,991

The hacker's browser.

Pros of Vimium

  • More active development and larger community support
  • Broader browser compatibility (Chrome, Firefox, Edge)
  • More extensive documentation and user guides

Cons of Vimium

  • Less customizable than Chromium-Vim
  • Fewer advanced features for power users
  • Limited visual styling options

Code Comparison

Vimium (key mapping):

const keyMappings = {
  "j": "scrollDown",
  "k": "scrollUp",
  "h": "scrollLeft",
  "l": "scrollRight"
};

Chromium-Vim (key mapping):

const defaultKeyMappings = {
  "j": "scrollPageDown",
  "k": "scrollPageUp",
  "h": "previousTab",
  "l": "nextTab"
};

Both extensions use similar approaches for key mappings, but Chromium-Vim offers more granular control over scroll behavior and tab navigation. Vimium's mappings are more straightforward, focusing on basic scrolling actions.

Vimium is generally easier to use out of the box, with a gentler learning curve for newcomers to Vim-style navigation. Chromium-Vim, while more complex, provides greater flexibility and power for users willing to invest time in customization.

A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.

Pros of Tridactyl

  • More actively maintained with frequent updates
  • Supports Firefox, providing a cross-browser solution
  • Offers a more extensive set of customization options

Cons of Tridactyl

  • Steeper learning curve due to more complex configuration
  • May have a higher performance impact on browser speed

Code Comparison

Chromium-vim command mapping:

map('j', 'scrollDown');
map('k', 'scrollUp');

Tridactyl command mapping:

bind j scrollline 10
bind k scrollline -10

Both extensions aim to provide vim-like keybindings for web browsing, but Tridactyl offers more granular control over scroll behavior. Chromium-vim's approach is simpler, while Tridactyl allows users to specify the number of lines to scroll.

Tridactyl's configuration is typically more verbose and powerful, allowing for more complex behaviors and customizations. This can be both an advantage for power users and a potential drawback for those seeking a simpler setup.

Overall, Tridactyl offers a more feature-rich experience at the cost of complexity, while Chromium-vim provides a more straightforward approach to vim-style navigation in the browser.

Map your keys for web surfing, expand your browser with javascript and keyboard.

Pros of Surfingkeys

  • More extensive customization options, including a JavaScript API for creating custom key mappings and functions
  • Built-in support for visual mode, allowing for text selection and manipulation
  • Regular updates and active development, with a larger community of contributors

Cons of Surfingkeys

  • Steeper learning curve due to more complex configuration options
  • Slightly higher resource usage compared to chromium-vim

Code Comparison

Surfingkeys configuration example:

mapkey('<Ctrl-y>', 'Show me the money', function() {
    Front.showPopup('Here is the money!');
});

chromium-vim configuration example:

let configpath = '/path/to/config/file'
set smoothscroll
map <C-y> :echo "Show me the money"<CR>

Both extensions allow for custom key mappings, but Surfingkeys provides more flexibility with its JavaScript API, while chromium-vim uses a more traditional Vim-like syntax for configuration.

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar

Pros of vimium-c

  • More actively maintained with frequent updates
  • Supports additional features like visual mode and custom key mappings
  • Better performance and memory usage optimization

Cons of vimium-c

  • Steeper learning curve due to more complex configuration options
  • May have occasional compatibility issues with certain websites

Code Comparison

vimium-c:

const keyMap = {
  "j": "scrollDown",
  "k": "scrollUp",
  "gg": "scrollToTop",
  "G": "scrollToBottom"
};

chromium-vim:

var defaultKeyMap = {
  "j": "scrollDown",
  "k": "scrollUp",
  "<C-d>": "scrollPageDown",
  "<C-u>": "scrollPageUp"
};

Both extensions use similar key mapping structures, but vimium-c offers more extensive customization options and additional commands. The code snippets demonstrate basic scrolling functionality, with vimium-c including more granular control (e.g., "gg" for scroll to top).

vimium-c generally provides a more feature-rich experience with better performance, while chromium-vim offers a simpler, more straightforward approach. Users seeking advanced functionality and customization may prefer vimium-c, while those looking for a basic Vim-like browsing experience might find chromium-vim sufficient.

Vimperator

Pros of Vimperator-labs

  • More extensive and mature codebase with a longer development history
  • Broader feature set, including advanced customization options
  • Larger community and more extensive documentation

Cons of Vimperator-labs

  • Limited to Firefox browser, while Chromium-vim supports Chrome and Chromium-based browsers
  • Heavier resource usage due to its more comprehensive feature set
  • Development has slowed down in recent years

Code Comparison

Vimperator-labs (JavaScript):

liberator.modules.commands.add(["fo[rward]"],
    "Go forward in the browser history",
    function (args) {
        window.content.history.forward();
    },
    { argCount: "0" });

Chromium-vim (JavaScript):

Mappings.addCommand({
  name: 'forward',
  description: 'Go forward in history',
  func: () => {
    chrome.tabs.goForward();
  }
});

Both projects implement similar functionality for navigating browser history, but Vimperator-labs uses a more verbose syntax and relies on Firefox-specific APIs, while Chromium-vim uses a more concise approach with Chrome extension APIs.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Like cVim? Consider donating! https://www.paypal.me/1995eaton

What is cVim?

Vim for Google Chrome. I hate using the mouse, especially after learning Vim. With my desktop (Linux), I have a lot of key bindings that make doing things easier: I open Chrome with Alt+w, I close a window with Alt+Shift+d, I open a terminal with Alt+t. This is harder to do with Chrome because it has no section for customizing keyboard shortcuts, and it is still necessary to use the mouse to do things like click links. cVim aims to eliminate this problem as best as the Chrome extensions API will allow it to.

Where can I get cVim?

  • There are two ways:
  • You can install it through the Chrome web store
  • You can download the .zip file here and enable cVim by going to the chrome://extensions URL and checking developer mode, then pointing Chrome to the unzipped folder via the Load unpacked extensions... button.

Why is this different than Vimium, ViChrome, or Vrome?

These extensions do a wonderful job of adding Vim-like keybindings to Google Chrome, but they lack many of the features that Firefox Addon, Pentadactyl, have.

  • What features does cVim add to Chrome?
  • Google/IMDB/Wikipedia/Amazon/Duckduckgo/Yahoo/Bing search completion
  • Support for custom search engines
  • History and Bookmark search/completion with bookmark folder support
  • Caret/Visual mode
  • Efficient link hints (with support for custom mappings)
  • Support for custom keyboard mappings
  • Regex page search with highlighting
  • Command bar with tab-completion
  • Smooth scrolling

cVim Help

cVimrc

  • Boolean cVimrc settings are enabled with the command 'set' + <SETTING_NAME> and disabled with the command 'set' + no<SETTING_NAME> (for example, set regexp and set noregexp)
  • Boolean cVimrc settings can be inversed by adding "!" to the end
  • Other settings are defined with = used as a separator and are prefixed by let (for example, let hintcharacters="abc")
settingtypedescriptiondefault
searchlimitintegerset the amount of results displayed in the command bar25
scrollstepintegerset the amount of pixels scrolled when using the scrollUp and scrollDown commands70
timeoutlenintegerThe amount of time to wait for a <Leader> mapping in milliseconds1000
fullpagescrollpercentintegerset the percent of the page to be scrolled by when using the scrollFullPageUp and scrollFullPageDown commands0
typelinkhintsdelayintegerthe amount of time (in milliseconds) to wait before taking input after opening a link hint with typelinkhints and numerichints enabled300
scrolldurationintegerthe duration of smooth scrolling500
vimportintegerset the port to be used with the editWithVim insert mode command8001
zoomfactorinteger / doublethe step size when zooming the page in/out0.1
scalehintsbooleananimate link hints as they appearfalse
hudbooleanshow the heads-up-displaytrue
regexpbooleanuse regexp in find modetrue
ignorecasebooleanignore search case in find modetrue
linkanimationsbooleanshow fade effect when link hints open and closefalse
numerichintsbooleanuse numbers for link hints instead of a set of charactersfalse
dimhintcharactersbooleandim letter matches in hint characters rather than remove them from the hinttrue
defaultnewtabpagebooleanuse the default chrome://newtab page instead of a blank pagefalse
cncpcompletionbooleanuse <C-n> and <C-p> to cycle through completion results (requires you to set the nextCompletionResult keybinding in the chrome://extensions page (bottom right)false
smartcasebooleancase-insensitive find mode searches except when input contains a capital lettertrue
incsearchbooleanbegin auto-highlighting find mode matches when input length is greater thant two characterstrue
typelinkhintsboolean(numerichints required) type text in the link to narrow down numeric hintsfalse
autohidecursorbooleanhide the mouse cursor when scrolling (useful for Linux, which doesn't auto-hide the cursor on keydown)false
autofocusbooleanallows websites to automatically focus an input box when they are first loadedtrue
insertmappingsbooleanuse insert mappings to navigate the cursor in text boxes (see bindings below)true
smoothscrollbooleanuse smooth scrollingfalse
autoupdategistbooleanif a GitHub Gist is used to sync settings, pull updates every hour (and when Chrome restarts)false
nativelinkorderbooleanOpen new tabs like Chrome does rather than next to the currently opened tabfalse
showtabindicesbooleanDisplay the tab index in the tab's titlefalse
sortlinkhintsbooleanSort link hint lettering by the link's distance from the top-left corner of the pagefalse
localconfigbooleanRead the cVimrc config from configpath (when this is set, you connot save from cVim's options pagefalse
completeonopenbooleanAutomatically show a list of command completions when the command bar is openedfalse
configpathstringRead the cVimrc from this local file when configpath is set""
changelogbooleanAuto open the changelog when cVim is updatedtrue
completionenginesarray of stringsuse only the specified search engines["google", "duckduckgo", "wikipedia", "amazon"]
blacklistsarray of stringsdisable cVim on the sites matching one of the patterns[]
mapleaderstringThe default <Leader> key\
defaultenginestringset the default search engine"google"
localestringset the locale of the site being completed/searched on (see example configuration below)""
homedirectorystringthe directory to replace ~ when using the file command""
qmark <alphanumeric charcter>stringadd a persistent QuickMark (e.g. let qmark a = ["http://google.com", "http://reddit.com"])none
previousmatchpatternstring (regexp)the pattern looked for when navigating a page's back button((?!last)(prev(ious)?|newer|back|«|less|<|‹| )+)
nextmatchpatternstring (regexp)the pattern looked for when navigation a page's next button((?!first)(next|older|more|>|›|»|forward| )+)
hintcharactersstring (alphanumeric)set the default characters to be used in link hint mode"asdfgqwertzxcvb"
barpositionstring ["top", "bottom"]set the default position of the command bar"top"
langmapstringset a list of characters to be remapped (see vims langmap)""

Example configuration

" Settings
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
                " sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"

let locale = "uk" " Current choices are 'jp' and 'uk'. This allows cVim to use sites like google.co.uk
                  " or google.co.jp to search rather than google.com. Support is currently limited.
                  " Let me know if you need a different locale for one of the completion/search engines
let hintcharacters = "abc123"

let searchengine dogpile = "http://www.dogpile.com/search/web?q=%s" " If you leave out the '%s' at the end of the URL,
                                                                    " your query will be appended to the link.
                                                                    " Otherwise, your query will replace the '%s'.

" This will do the same thing as above, except typing ':tabnew withbase' into to command bar
" without any search parameters will open 'http://www.dogpile.com'
let searchengine withbase = ["http://www.dogpile.com", "http://www.dogpile.com/search/web?q=%s"]

" alias ':g' to ':tabnew google'
command g tabnew google

let completionengines = ["google", "amazon", "imdb", "dogpile"]

let searchalias g = "google" " Create a shortcut for search engines.
                             " For example, typing ':tabnew g example'
                             " would act the same way as ':tabnew google example'

" Open all of these in a tab with `gna` or open one of these with <N>goa where <N>
let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"]

let blacklists = ["https://mail.google.com/*", "*://mail.google.com/*", "@https://mail.google.com/mail/*"]
" blacklists prefixed by '@' act as a whitelist

let mapleader = ","

" Mappings

map <Leader>r reloadTabUncached
map <Leader>x :restore<Space>

" This remaps the default 'j' mapping
map j scrollUp

" You can use <Space>, which is interpreted as a
" literal " " character, to enter buffer completion mode
map gb :buffer<Space>

" This unmaps the default 'k' mapping
unmap k

" This unmaps the default 'h', 'j', 'k', and 'l' mappings
unmap h j k l

" This remaps the default 'f' mapping to the current 'F' mapping
map f F

" Toggle the current HUD display value
map <C-h> :set hud!<CR>

" Switch between alphabetical hint characters and numeric hints
map <C-i> :set numerichints!<CR>

map <C-u> rootFrame
map <M-h> previousTab
map <C-d> scrollPageDown
map <C-e> scrollPageUp
iunmap <C-y>
imap <C-m> deleteWord

" Create a variable that can be used/referenced in the command bar
let @@reddit_prog = 'http://www.reddit.com/r/programming'
let @@top_all = 'top?sort=top&t=all'
let @@top_day = 'top?sort=top&t=day'

" TA binding opens 'http://www.reddit.com/r/programming/top?sort=top&t=all' in a new tab
map TA :tabnew @@reddit_prog/@@top_all<CR>
map TD :tabnew @@reddit_prog/@@top_day<CR>

" Use paste buffer in mappings
map T :tabnew wikipedia @"<CR>

" Code blocks (see below for more info)
getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
            function(res) { Status.setMessage('IP: ' + res.ip); });
}}
" Displays your public IP address in the status bar
map ci :call getIP<CR>

" Script hints
echo(link) -> {{
  alert(link.href);
}}
map <C-f> createScriptHint(echo)

let configpath = '/path/to/your/.cvimrc'
set localconfig " Update settings via a local file (and the `:source` command) rather
                " than the default options page in chrome
" As long as localconfig is set in the .cvimrc file. cVim will continue to read
" settings from there

Blacklists

Site-specific Configuration

  • You can enable certain rc settings for sites using the blacklist match pattern as described above
" this will enable the config block below on the domain 'reddit.com'
site '*://*.reddit.com/*' {
      unmap j
      unmap k
      set numerichints
}

Running commands when a page loads

  • In a similar fashion to the site-specific configuration described above, cVim can run commands when a page is loaded with the call keyword
" In this case, when pages with a file ending in '.js' are loaded,
" cVim will pin the tab and then scroll down
site '*://*/*.js' {
      call :pintab
      call scrollDown
}

Mappings

  • Normal mappings are defined with the following structure: map <KEY> <MAPPING_NAME>
  • Insert mappings use the same structure, but use the command "imap" instead of "map"
  • Control, meta, and alt can be used also:
<C-u> " Ctrl + u
<M-u> " Meta + u
<A-u> " Alt  + u
  • It is also possible to unmap default bindings with unmap <KEY> and insert bindings with iunmap <KEY>
  • To unmap all default keybindings, use unmapAll. To unmap all default insert bindings, use iunmapAll

Tabs

  • Commands that open links (:tabnew and :open) have three different properties
  • ! => Open in a new tab
  • $ => Open in a new window
  • | => Open in an incognito window
  • & => Open in a new tab (inactive/unfocused)
  • * => Pin the tab
  • ? => Treat the query as a search
  • = => Treat the query as a URL
  • The use of these properties are best explained with examples:
:open! google<CR> " This is the same as :tabnew google<CR>

:open google!<CR> " This is another way of writing the above
                  " (these flags can can be added to either
                  " the base command or the end of the final command)

:open& google<CR> " This will open Google in a new inactive tab

:open$ google<CR> " This will open Google in a new window

:open&* google<CR> " The will open Google in a new inactive, pinned tab

:tabnew google&*<CR> " Once again, this will do the same thing as the above command

:open google&*<CR> " Again, same as above

:open google!& " Here, the & flag will cancel out the ! flag,
               " opening Google in a new inactive tab

" More examples
:bookmarks my_bookmark.com&  " inactive,new tab
:bookmarks&* my_bookmark.com " inactive,pinned,new tab
:bookmarks! my_bookmark.com  " new tab
:bookmarks$ my_bookmark.com  " new window
:bookmarks my_bookmark.com   " same tab

Code blocks

  • Code blocks allow you to interact with cVim's content scripts via the cVimrc.
  • Since code blocks use eval(...), you should only use them if you know what you're doing.
" To be used by the code block
set hintset_a

" Create a code block named switchHintCharacters
switchHintCharacters -> {{
  // We are now in JavaScript mode

  // Settings are contained in an object named settings
  settings.hintset_a = !settings.hintset_a;
  if (settings.hintset_a) {
    settings.hintcharacters = 'abc'; // equivalent to "let hintcharacters = 'abc'"
  } else {
    settings.hintcharacters = 'xyz';
  }

  // Propagate the current settings to all tabs for the
  // rest of the session
  PORT('syncSettings', { settings: settings });

  // Display cVim's status bar for 2 seconds.
  Status.setMessage('Hint Set: ' + (true ? 'a' : 'b'), 2);
}}

" Run the JavaScript block
map <Tab> :call switchHintCharacters<CR>

Completion Engines

  • These are a list of completion engines that can be used in the command bar. They can be set by assigning their names to an array with the completionengines variable.
    • google, wikipedia, youtube, imdb, amazon, google-maps, wolframalpha, google-image, ebay, webster, wictionary, urbandictionary, duckduckgo, answers, google-trends, google-finance, yahoo, bing, themoviedb
  • Example usage:
let completionengines = ['google', 'google-image', 'youtube'] " Show only these engines in the command bar

Keybindings

MovementMapping name
j, sscroll downscrollDown
k, wscroll upscrollUp
hscroll leftscrollLeft
lscroll rightscrollRight
dscroll half-page downscrollPageDown
unmappedscroll full-page downscrollFullPageDown
u, escroll half-page upscrollPageUp
unmappedscroll full-page upscrollFullPageUp
ggscroll to the top of the pagescrollToTop
Gscroll to the bottom of the pagescrollToBottom
0scroll to the left of the pagescrollToLeft
$scroll to the right of the pagescrollToRight
#reset the scroll focus to the main pageresetScrollFocus
gigo to first input boxgoToInput
gIgo to the last focused input box by gigoToLastInput
zzcenter page to current search match (middle)centerMatchH
ztcenter page to current search match (top)centerMatchT
zbcenter page to current search match (bottom)centerMatchB
Link Hints
fopen link in current tabcreateHint
Fopen link in new tabcreateTabbedHint
unmappedopen link in new tab (active)createActiveTabbedHint
Wopen link in new windowcreateHintWindow
Arepeat last hint commandopenLastHint
qtrigger a hover event (mouseover + mouseenter)createHoverHint
Qtrigger a unhover event (mouseout + mouseleave)createUnhoverHint
mfopen multiple linkscreateMultiHint
unmappededit text with external editorcreateEditHint
unmappedcall a code block with the link as the first argumentcreateScriptHint(<FUNCTION_NAME>)
unmappedopens images in a new tabfullImageHint
mrreverse image search multiple linksmultiReverseImage
myyank multiple links (open the list of links with P)multiYankUrl
gycopy URL from link to clipboardyankUrl
grreverse image search (google images)reverseImage
;change the link hint focus
QuickMarks
M<*>create quickmark <*>addQuickMark
go<*>open quickmark <*> in the current tabopenQuickMark
gn<*>open quickmark <*> in a new tabopenQuickMarkTabbed
gw<*>open quickmark <*> in a new windowopenQuickMarkWindowed
Miscellaneous
aalias to ":tabnew google ":tabnew google
.repeat the last commandrepeatCommand
:open command baropenCommandBar
/open search baropenSearchBar
?open search bar (reverse search)openSearchBarReverse
unmappedopen link search bar (same as pressing /?)openLinkSearchBar
Isearch through browser history:history
<N>g%scroll <N> percent down the pagepercentScroll
<N>unmappedpass <N> keys through to the current pagepassKeys
ienter insert mode (escape to exit)insertMode
rreload the current tabreloadTab
gRreload the current tab + local cachereloadTabUncached
;<*>create mark <*>setMark
''go to last scroll positionlastScrollPosition
<C-o>go to previous scroll positionpreviousScrollPosition
<C-i>go to next scroll positionnextScrollPosition
'<*>go to mark <*>goToMark
cmmute/unmute a tabmuteTab
nonereload all tabsreloadAllTabs
crreload all tabs but currentreloadAllButCurrent
zizoom page inzoomPageIn
zozoom page outzoomPageOut
z0zoom page to original sizezoomOrig
z<Enter>toggle image zoom (same as clicking the image on image-only pages)toggleImageZoom
gdalias to :chrome://downloads<CR>:chrome://downloads<CR>
gealias to :chrome://extensions<CR>:chrome://extensions<CR>
yycopy the URL of the current page to the clipboardyankDocumentUrl
yYcopy the URL of the current frame to the clipboardyankRootUrl
yacopy the URLs in the current windowyankWindowUrls
yhcopy the currently matched text from find mode (if any)yankHighlight
bsearch through bookmarks:bookmarks
popen the clipboard selectionopenPaste
Popen the clipboard selection in a new tabopenPasteTab
gjhide the download shelfhideDownloadsShelf
gfcycle through iframesnextFrame
gFgo to the root framerootFrame
gqstop the current tab from loadingcancelWebRequest
gQstop all tabs from loadingcancelAllWebRequests
gugo up one path in the URLgoUpUrl
gUgo to to the base URLgoToRootUrl
gsgo to the view-source:// page for the current Url:viewsource!
<C-b>create or toggle a bookmark for the current URLcreateBookmark
unmappedclose all browser windowsquitChrome
g-decrement the first number in the URL path (e.g www.example.com/5 => www.example.com/4)decrementURLPath
g+increment the first number in the URL pathincrementURLPath
Tab Navigation
gt, K, Rnavigate to the next tabnextTab
gT, J, Enavigate to the previous tabpreviousTab
g0, g$go to the first/last tabfirstTab, lastTab
<C-S-h>, ghopen the last URL in the current tab's history in a new tabopenLastLinkInTab
<C-S-l>, glopen the next URL from the current tab's history in a new tabopenNextLinkInTab
xclose the current tabcloseTab
gxTclose the tab to the left of the current tabcloseTabLeft
gxtclose the tab to the right of the current tabcloseTabRight
gx0close all tabs to the left of the current tabcloseTabsToLeft
gx$close all tabs to the right of the current tabcloseTabsToRight
Xopen the last closed tablastClosedTab
t:tabnew:tabnew
T:tabnew <CURRENT URL>:tabnew @%
O:open <CURRENT URL>:open @%
<N>%switch to tab <N>goToTab
H, Sgo backgoBack
L, Dgo forwardgoForward
Bsearch for another active tab:buffer
<move current tab leftmoveTabLeft
>move current tab rightmoveTabRight
]]click the "next" link on the page (see nextmatchpattern above)nextMatchPattern
[[click the "back" link on the page (see previousmatchpattern above)previousMatchPattern
gppin/unpin the current tabpinTab
<C-6>toggle the focus between the last used tabslastUsedTab
Find Mode
nnext search resultnextSearchResult
Nprevious search resultpreviousSearchResult
venter visual/caret mode (highlight current search/selection)toggleVisualMode
Venter visual line mode from caret mode/currently highlighted searchtoggleVisualLineMode
unmappedclear search mode highlightingclearSearchHighlight
Visual/Caret Mode
<Esc>exit visual mode to caret mode/exit caret mode to normal mode
vtoggle between visual/caret mode
h, j, k, lmove the caret position/extend the visual selection
ycopys the current selection
nselect the next search result
Nselect the previous search result
popen highlighted text in current tab
Popen highlighted text in new tab
Text boxes
<C-i>move cursor to the beginning of the linebeginningOfLine
<C-e>move cursor to the end of the lineendOfLine
<C-u>delete to the beginning of the linedeleteToBeginning
<C-o>delete to the end of the linedeleteToEnd
<C-y>delete back one worddeleteWord
<C-p>delete forward one worddeleteForwardWord
unmappeddelete back one characterdeleteChar
unmappeddelete forward one characterdeleteForwardChar
<C-h>move cursor back one wordbackwardWord
<C-l>move cursor forward one wordforwardWord
<C-f>move cursor forward one letterforwardChar
<C-b>move cursor back one letterbackwardChar
<C-j>move cursor forward one lineforwardLine
<C-k>move cursor back one linebackwardLine
unmappedselect input text (equivalent to <C-a>)selectAll
unmappededit with Vim in a terminal (need the cvim_server.py script running for this to work and the VIM_COMMAND set inside that script)editWithVim

Command Mode

CommandDescription
:tabnew (autocomplete)open a new tab with the typed/completed search
:new (autocomplete)open a new window with the typed/completed search
:open (autocomplete)open the typed/completed URL/google search
:history (autocomplete)search through browser history
:bookmarks (autocomplete)search through bookmarks
:bookmarks /<folder> (autocomplete)browse bookmarks by folder/open all bookmarks from folder
:set (autocomplete)temporarily change a cVim setting
:chrome:// (autocomplete)open a chrome:// URL
:tabhistory (autocomplete)browse the different history states of the current tab
:command <NAME> <ACTION>aliases :<NAME> to :<ACTION>
:quitclose the current tab
:qallclose the current window
:restore (autocomplete)restore a previously closed tab (newer versions of Chrome only)
:tabattach (autocomplete)move the current tab to another open window
:tabdetachmove the current tab to a new window
:file (autocomplete)open a local file
:source (autocomplete)load a cVimrc file into memory (this will overwrite the settings in the options page if the localconfig setting had been set previously
:duplicateduplicate the current tab
:settingsopen the settings page
:nohlsearchclear the highlighted text from the last search
:executeexecute a sequence of keys (Useful for mappings. For example, "map j :execute 2j")
:buffer (autocomplete)change to a different tab
:mksessioncreate a new session from the current tabs in the active window
:delsession (autocomplete)delete a saved session
:session (autocomplete)open the tabs from a saved session in a new window
:scriptrun JavaScript on the current page
:togglepintoggle the pin state of the current tab
:pintabpin the current tab
:unpintabunpin the current tab

Tips

  • You can use @% in "open" commands to specify the current URL. For example, :open @% would essentially refresh the current page.
  • Prepend a number to the command to repeat that command N times
  • Use the up/down arrows in command/find mode to navigate through previously executed commands/searches -- you can also use this to search for previously executed commands starting with a certain combination of letters (for example, entering ta in the command bar and pressing the up arrow will search command history for all matches beginning with ta

Contributing

Nice that you want to spend some time improving this extension. Solving issues is always appreciated. If you're going to add a feature, it would be best to submit an issue. You'll get feedback whether it will likely be merged.

  1. Run npm install in the repository's root folder
  2. Run make
  3. Navigate to chrome://extensions
  4. Toggle into Developer Mode
  5. Click on "Load Unpacked Extension..."
  6. Select the cVim directory.