Add horizontal Scrolling - editor

I am trying to make it so when I hold Alt and scroll the mouse wheel the editor scrolls to the right or left.
I have tried adding this to the (Windows).sublime-mousemap file.
{ "button": "scroll_up", "modifiers": ["alt"], "command": "scroll_width", "args": {"amount": 30 } },
{ "button": "scroll_down", "modifiers": ["alt"], "command": "scroll_width", "args": {"amount": -30 } },
But it will not pick up this command. I am new to sublime so I think I might have the syntax wrong or missed something out.

From what I have found elsewhere I don't think this is natively supported so I installed a package to add this command. For anyone else that is completely new here is a step by step idiots guide.
Install wbond package manager (This has a lot of functionality other than just installing packages like I will do)
https://sublime.wbond.net/installation
You need to run the code on this page (Pick Sublime2 or 3 depending on which you have)
To open up the text console within Sublime you need to press 3 keys on windows Crtl + and ' Make sure you have the third which is a single quote! It took me a few looks to see if it was dirt on my screen or a quote!
A small text field opens at the bottom of sublime. Copy and past the command from wbonds installation instructions and press enter.
Then press CTRL P
search for Horizontal Scroll by TheOnlyRew
https://sublime.wbond.net/packages/Horizontal%20Scroll
Click on that option and then add this code to your windows mouse map file
{ "button": "scroll_up", "modifiers": ["alt"], "command": "scroll_width", "args": {"amount": 30 } },
{ "button": "scroll_down", "modifiers": ["alt"], "command": "scroll_width", "args": {"amount": -30 } },
If adding this at the end of a file remove the last comma.
NOTE: Current Issue that I have encountered. This works, the only caveat is that after a horizontal scroll on my laptops trackpad I cannot then do a vertical scroll! I have to click or highlight somewhere in the document.

Related

How to copy to clipboard clicking on mouse extra buttons?

I am using xbindkeys and xvkbd for copy and paste by clicking on side buttons on mouse having this config
cat ~/.xbindkeysrc
"xvkbd -text '\Cv'"
b:8 + Release
"xvkbd -text '\Cc'"
b:9 + Release
But that works so bad: sometimes key "Control" remains to be pressed, sometimes instead of Ctrl+c it just pressing key 'c' and breaks my text replacing it with 'c'. I need another method, I hoped xclip, xsel can help, but actually this does not work:
"xclip -o"
b:8 + Release
"xclip -sel clip"
b:9 + Release
so, this does not copy and paste as expected, when I try to paste to browser address bar or to text editor.
Is it possible to bind mouse extra buttons to paste and copy reliably?

Only terminal window resizing in Awesome WM

I am using awesome window manager (new to it). The normal keybinding for changing size for the window in tiling mode is Super+h & Super+L but it only resizes the terminal window (I am using alacrity & it is resizing that), but if I try to resize another window instance firefox, it is not resizing that. Any solution will be appreciated
I'd recommend https://github.com/lcpz/awesome-copycats for newcomers. Also this is a related question: What is incwfact and setwfact of awesome.client
Basically what you need is hidden in this documentation page:
https://awesomewm.org/doc/api/classes/tag.html
incmwfact: Increase master width factor
And here: https://awesomewm.org/doc/api/classes/client.html
incwfact: Change window factor of a client.
Example from my config:
K.win is the Mod4 Key which is the windows key on my keyboard.
I'm "expanding" the current window (client) to the location indicated by the arrow key. Actually I'd need some extra code for up/down to work correctly in all cases but I rarely have vertically stacked windows.
awful.key(
{K.win},
"Right",
function()
awful.tag.incmwfact(0.05)
end,
),
awful.key(
{K.win},
"Left",
function()
awful.tag.incmwfact(-0.05)
end,
),
awful.key(
{K.win},
"Down",
function()
awful.client.incwfact(-0.05)
end,
),
awful.key(
{K.win},
"Up",
function()
awful.client.incwfact(0.05)
end,
),

is there any atom style file tree close and open functionality available for vscode? [duplicate]

It'd be handy if there was a keyboard shortcut for hiding and showing the sidebar. Sublime has cmd+k+b and it's a quick way of gaining some screen real estate when you need it. Anybody know if this exists or if the user can add it manually to VS Code?
The command can be triggered via Ctrl+B on Windows and Linux or Cmd+B on the Mac.
There are 3 bars on the side, 2 left and 1 right:
the activity bar with 5 buttons
the primary sidebar toggled by clicking any of the activity bar buttons.
the minimap
All of these hotkeys and more (e.g. the terminal & output panel, Ctrl+J) are now visible through the View (Alt-V) and View>Appearance menus:
The activity bar has no toggle hotkey by default, but you can assign one like this:
{
"key": "ctrl+alt+b",
"command": "workbench.action.toggleActivityBarVisibility"
},
Or hide completely with "workbench.activityBar.visible": false
The sidebar toggle hotkey is Ctrl+B by default, but may be overridden by e.g. vim plugin, here's how to enforce or change it:
{
"key": "ctrl+b",
"command": "workbench.action.toggleSidebarVisibility"
},
The minimap can be hidden with "editor.minimap.enabled": false and toggled with editor.action.toggleMinimap since vscode 1.16.
And with the Sidebar-activity toggler extension, so you toggle both activity and sidebar together with one key mapping to sidebar-activity-toggler.toggleSidebarAndActivityBar
To Hide the 5 button Activity Bar we can now:
View -> Hide Activity Bar
This is in vscode 1.9, not sure which version it was introduced in.
As Benjamin Pasero's answer states you can use:
Ctrl+B on Windows and Linux
⌘ Cmd+B on the Mac.
but sometimes you have another keyboard shortcut with ⌘ Cmd+B, in my case I had it to format some React code. To reverse that you can use the following:
Code > Preferences > Keyboard Shortcuts (⌘+K ⌘+S) then search for B and disable the other shortcut command.
You can also change the it and put which ever shortcut you want, just search for Toggle Side Bar Visibility like this:
Just in case you be intended for hiding the right lateral "sidebar", also called minimap, there is no shortcut. But you can configure the settings with:
{"editor.minimap.enabled: false"}
One can also hide the activity bar with the following setting in settings.json:
"workbench.activityBar.visible": false
To hide/show the side bar:
Ctrl+B on Linux and Windows.
⌘ Cmd+B on Mac.
No need to edit Settings.json directly
Do the following:
Open the Keyboard Shortcuts by pressing ctrl+k & ctrl+s
Search: "Toggle Activity Bar Visibility"
Enter the keyboard shortcut
Done!
Activity bar visibility in visual studio code
Mac users,
⌘ + B or
⌘ + 0 - Worked Perfectly
In the VS code version 1.43, you can hide or show the side menu or activity bar by going under the 'VIEW' tab in the nav bar in the top margin of VS CODE(called the 'Menu Bar'). Go to View => Appearance, there you can check or uncheck different nav bars to show/hide each one.
If you have the top bar (Menu Bar) currently hidden press 'alt' key to bring it back then follow above instructions to check it to keep it there permanently if desired.

How do I change Atom ctrl-tab to not show pane?

In Sublime when cycling through tabs using ctrl-tab it opens and shows the file as I cycle through them. In Atom it shows a pane / list of the recently viewed files. I want to turn this off and just have it cycle through the files and display them as I press ctrl-tab like Sublime. How do I do this?
Go to File > Keymap...
Enter in the following code:
'body':
'ctrl-tab': 'unset!'
'ctrl-tab ^ctrl': 'unset!'
This should disable the pane feature completely.
If you want to cycle through the tabs, you press CTRL+PAGEDOWN for left to right; and CTRL+PAGEUP from right to left.
If you want to change the keybind entirely, as in you want to use CTRL+TAB to cycle through the tabs, you can insert this snippet into the Keymap:
'body':
'ctrl-tab': 'pane:show-next-item'
Move tabs settings (Settings > Packages > Tabs)
and uncheck 'Display MRU Tab Switching List'

jQuery transition effects not working and need improvement

I am trying to build a Windows 8 Metro style page which has a bunch of unordered lists which hide and show list items every few seconds, each with different animation effects. So I am trying to build a few different types of transition effects that I can use.
If you have a look at my jsfiddle (or see below for code) you can see that I have a few effects working (fade and slide up/down) but my explode and fold effects don't work.
Why is explode and fold not working?
Update: explode and fold are now working, thanks to dsundy for pointing out my stupidity, but still hoping for some help with...
Also, although slide left/right is working, is it possible to make the new item slide in at the same time so there is not a long gap between one LI sliding left and the other sliding in from the right?
With explode and fold is it possible to make the new LI appear underneath the outgoing LI?
Any suggestions for any more interesting transistions?
$(el).hide("explode", { pieces: 4 }, 1000, function () {
$(n).show("explode", { pieces: 4 }, 1000);
});
$(el).hide("fold", { }, 1000, function () {
$(n).show("fold", { }, 1000);
});
Explode and fold aren't working because you don't have click functions for those buttons.

Resources