Paweł Grzybek 4/25/2026

Vim tip: substitute pattern delimiter doesn't need to be a slash

Read Original

This article provides a quick tip for Vim and NeoVim users about the substitute command (:s). It highlights that the pattern delimiter does not need to be a forward slash; any single-byte non-alphanumeric character (except backslash, double quote, or pipe) can be used. This is especially useful for replacing file paths or URLs containing slashes, avoiding the need to escape them. The tip includes an example using a comma as a delimiter and references the similar behavior in the sed command-line tool. It is a short, practical guide for developers and tech enthusiasts using Vim.

Vim tip: substitute pattern delimiter doesn't need to be a slash

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet