1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-15 21:18:02 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Bob Conan
12f4f3969d Merge 5615da920f into 77f3c6a43d 2024-12-07 11:21:34 -05:00
jbranchaud
77f3c6a43d Add Synchronize Vim Clipboard With System Clipboad as a VSCode TIL 2024-12-07 10:18:29 -06:00
Bob Conan
5615da920f Update README.md, fix typos 2024-11-15 16:16:31 -06:00
BobConanDev
c60c63f554 Updated README.md, fix typo(s) 2024-11-15 16:42:57 -05:00
2 changed files with 31 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1530 TILs and counting..._
_1531 TILs and counting..._
---
@@ -191,7 +191,7 @@ _1530 TILs and counting..._
- [Aliasing An Ansible Host](devops/aliasing-an-ansible-host.md)
- [Allow Cross-Origin Requests To Include Cookies](devops/allow-cross-origin-requests-to-include-cookies.md)
- [Allow HTTPS Through Your UFW Firewall](devops/allow-https-through-your-ufw-firewall.md)
- [Check For Cached Site Assocation File For iOS](devops/check-for-cached-site-association-file-for-ios.md)
- [Check For Cached Site Association File For iOS](devops/check-for-cached-site-association-file-for-ios.md)
- [Check The Status of All Services](devops/check-the-status-of-all-services.md)
- [Check The Syntax Of nginx Files](devops/check-the-syntax-of-nginx-files.md)
- [Connect To An RDS PostgreSQL Database](devops/connect-to-an-rds-postgresql-database.md)
@@ -736,7 +736,7 @@ _1530 TILs and counting..._
- [Check If Clusters Are Upgrade Compatible](postgres/check-if-clusters-are-upgrade-compatible.md)
- [Check If The Local Server Is Running](postgres/check-if-the-local-server-is-running.md)
- [Check If User Role Exists For Database](postgres/check-if-user-role-exists-for-database.md)
- [Check Table For Any Oprhaned Records](postgres/check-table-for-any-orphaned-records.md)
- [Check Table For Any Orphaned Records](postgres/check-table-for-any-orphaned-records.md)
- [Checking Inequality](postgres/checking-inequality.md)
- [Checking The Type Of A Value](postgres/checking-the-type-of-a-value.md)
- [Clear The Screen In psql](postgres/clear-the-screen-in-psql.md)
@@ -1748,6 +1748,7 @@ _1530 TILs and counting..._
- [Open An Integrated Terminal Window](vscode/open-an-integrated-terminal-window.md)
- [Pop Open The Quick Fix Window](vscode/pop-open-the-quick-fix-window.md)
- [Step Through Project-Wide Search Results](vscode/step-through-project-wide-search-results.md)
- [Synchronize Vim Clipboard With System Clipboard](vscode/synchronize-vim-clipboard-with-system-clipboard.md)
- [Toggle Between Terminals](vscode/toggle-between-terminals.md)
- [Turn Off Display Of Tabs For Files](vscode/turn-off-display-of-tabs-for-files.md)

View File

@@ -0,0 +1,27 @@
# Synchronize Vim Clipboard With System Clipboard
When I use Vim-mode in VSCode, I _yank_ text onto the Vim clipboard by visually
selecting some text and hitting `y`. Then I can move the cursor somewhere else
in the file (or another file in VSCode) and _paste_ it by hitting `p`.
But what if I want the thing I yanked from a file to be pasted into another
program, like Chrome? Or if I've copied some text from another program and I
want to paste it into a file in VSCode?
This cross-program copy and pasting is what the _system clipboard_ on your
operating system is for. By default, the Vim clipboard is separate from the
system clipboard. I personally prefer for them to be one and the same.
To achieve this, I added the following line to my VSCode config in
`settings.json`:
```json
{
"vim.useSystemClipboard": true
}
```
It takes a little getting used to having them integrated, but I've done it for
so long that it is muscle memory. It's hard to not have them integrated now.
It's even better when I have a clipboard history tool like Raycast available
for accessing past clipboard values.