惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
Jina AI
Jina AI
B
Blog
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
腾讯CDC
C
Check Point Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
罗磊的独立博客
B
Blog RSS Feed
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
M
MIT News - Artificial intelligence
GbyAI
GbyAI

Codebase Audits & Rescue | Ally Piechowski

Most of your tech debt is free Your Setup Script Should Support Git Worktrees How to Be a Good Open Source Maintainer "The Git Commands I Run Before Reading Any Code" "Ruby 3.2 Is EOL: What You Actually Need to Do" "Rails 7.2 to 8.1 Upgrade: What Actually Breaks and How to Fix It" "Why Your Engineering Team Is Slow (It's the Codebase, Not the People)" "Migrating from Sprockets to Propshaft: Is It Worth It?" "How to Close a Tab in Vim" "How I Audit a Legacy Rails Codebase in the First Week" "How to Open a New Tab in Vim" "Rails default_scope: Why You Should Never Use It" "Solved: ActionController::ParameterMissing (param is missing or the value is empty)" "Solved: Warning: Using the last argument as keyword parameters is deprecated" "Rails: How to Use Greater Than/Less Than in Active Record where Statements" "What is the best time for stand-up meetings?" "Using Let and Context to Modularize RSpec Tests" "What Is Fed vs Unfed Sourdough Starter?" "My Father, My Mentor, My Teacher" "How to Get Over Burnout" "What's the difference between a Good Developer and a Good Googler?" Codebase Audits & Rescue | Ally Piechowski
"Vim: How to Open Current Opened File in New Tab"
"Ally Piechowski" · 2019-12-31 · via Codebase Audits & Rescue | Ally Piechowski

In vim, you can open the current file in a new tab by utilizing :tabnew %.

Ally Piechowski · · 1 min read
Vim: How to Open Current Opened File in New Tab

In vim, one of the largest challenges is learning how to create, open, and manage buffers.

In vim, how do you open the currently opened file in a new tab?

The Command

In order to open the current file in a new tab, utilize tabnew like so:

This utilizes the command :tabnew, in which opens a new tab with the argument %, which expands to the currently selected buffer’s file.

The Keybind

You can move the window, rather than opening the file, with the following keybind:

It should be noted that rather than opening another pane of the file, it moves the open file to a new tab.

More Reading

Enter the following commands in vim to read more:

:help tabnew
:help registers

Related Articles