Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Vietnamese Variable RenamerNew to Visual Studio Code? Get it now.
Vietnamese Variable Renamer

Vietnamese Variable Renamer

Vietnamese Renamer

|
2 installs
| (0) | Free
Tự động đổi tên biến từ tiếng Việt sang tiếng Anh khi bấm F2
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Vietnamese Variable Renamer Extension

Tự động đổi tên biến từ tiếng Việt sang tiếng Anh khi bấm F2 trong VSCode.

Tính năng

  • 🔄 Tự động dịch: Đổi tên biến tiếng Việt thành tiếng Anh chỉ với một cú nhấn F2
  • 🌐 Đa ngôn ngữ: Hỗ trợ JavaScript, TypeScript, Python, Java, C++
  • 📚 Từ điển phong phú: Hơn 200 từ/cụm từ lập trình phổ biến
  • ⚡ Nhanh chóng: Không cần mạng, chỉ sử dụng regex và AST
  • 🎯 Chính xác: Chỉ đổi biến, không động vào string hay comment

Cách cài đặt

  1. Mở VSCode
  2. Vào Extensions (Ctrl+Shift+X)
  3. Tìm kiếm "Vietnamese Variable Renamer"
  4. Nhấn Install
  5. Reload VSCode

Cách sử dụng

Phương pháp 1: F2 Rename (Khuyến nghị)

  1. Đặt con trỏ lên biến tiếng Việt (ví dụ: kiemTraDauVao)
  2. Nhấn F2
  3. Extension sẽ tự động gợi ý tên tiếng Anh (ví dụ: validateInput)
  4. Nhấn Enter để chấp nhận hoặc chỉnh sửa

Phương pháp 2: Command Palette

  1. Nhấn Ctrl+Shift+P
  2. Gõ "Rename Vietnamese Variable to English"
  3. Chọn từ danh sách gợi ý

Ví dụ

Tiếng Việt Tiếng Anh
kiemTraDauVao validateInput
xuLyDuLieu processData
luuThongTin saveInformation
tinhToanGia calculatePrice
capNhatTrangThai updateStatus
timKiemSanPham searchProduct
xacThucNguoiDung authenticateUser
themMoiDonHang addNewOrder

Ngôn ngữ được hỗ trợ

  • ✅ JavaScript
  • ✅ TypeScript
  • ✅ Python
  • ✅ Java
  • ✅ C++

Cấu hình

Mở Settings (Ctrl+,) và tìm "Vietnamese Renamer":

  • vietnameseRenamer.enableAutoSuggest: Bật/tắt gợi ý tự động (mặc định: true)

Từ điển

Extension sử dụng từ điển cố định với hơn 200 từ/cụm từ lập trình phổ biến:

Động từ lập trình

  • kiemTra → validate, check
  • xuLy → process
  • capNhat → update
  • them → add
  • xoa → delete
  • luu → save
  • tai → load

Danh từ dữ liệu

  • dauVao → input
  • dauRa → output
  • duLieu → data
  • thongTin → information
  • ketQua → result

Giao diện người dùng

  • giaoDien → interface
  • trang → page
  • nut → button
  • bang → table
  • form → form

Cách hoạt động

  1. Phát hiện: Extension quét code để tìm biến có ký tự tiếng Việt
  2. Phân tích: Sử dụng AST để xác định đây là biến (không phải string/comment)
  3. Dịch thuật: Chia tên biến thành từng từ và tra từ điển
  4. Gợi ý: Hiển thị tên tiếng Anh trong hộp rename

Troubleshooting

Extension không hoạt động?

  • Kiểm tra ngôn ngữ file có được hỗ trợ không
  • Đảm bảo biến có chứa ký tự tiếng Việt
  • Thử reload VSCode

Không có gợi ý dịch?

  • Từ có thể chưa có trong từ điển
  • Sử dụng Command Palette để xem tất cả gợi ý

Dịch sai?

  • Extension chỉ dịch theo từ điển cố định
  • Có thể chỉnh sửa tên sau khi gợi ý

Đóng góp

Nếu bạn muốn thêm từ mới vào từ điển, hãy tạo issue hoặc pull request!

License

MIT License - Sử dụng tự do cho mục đích cá nhân và thương mại.


English Version

Vietnamese Variable Renamer Extension

Automatically rename variables from Vietnamese to English with F2 in VSCode.

Features

  • 🔄 Auto Translation: Rename Vietnamese variables to English with just F2
  • 🌐 Multi-language: Supports JavaScript, TypeScript, Python, Java, C++
  • 📚 Rich Dictionary: 200+ common programming terms
  • ⚡ Fast: No internet required, uses regex and AST only
  • 🎯 Accurate: Only renames variables, leaves strings and comments untouched

Installation

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Vietnamese Variable Renamer"
  4. Click Install
  5. Reload VSCode

Usage

Method 1: F2 Rename (Recommended)

  1. Place cursor on Vietnamese variable (e.g., kiemTraDauVao)
  2. Press F2
  3. Extension will auto-suggest English name (e.g., validateInput)
  4. Press Enter to accept or edit

Method 2: Command Palette

  1. Press Ctrl+Shift+P
  2. Type "Rename Vietnamese Variable to English"
  3. Choose from suggestion list

Examples

Vietnamese English
kiemTraDauVao validateInput
xuLyDuLieu processData
luuThongTin saveInformation
tinhToanGia calculatePrice
capNhatTrangThai updateStatus
timKiemSanPham searchProduct
xacThucNguoiDung authenticateUser
themMoiDonHang addNewOrder

Supported Languages

  • ✅ JavaScript
  • ✅ TypeScript
  • ✅ Python
  • ✅ Java
  • ✅ C++

Configuration

Open Settings (Ctrl+,) and search "Vietnamese Renamer":

  • vietnameseRenamer.enableAutoSuggest: Enable/disable auto suggestions (default: true)

Dictionary

Extension uses a fixed dictionary with 200+ common programming terms:

Programming Verbs

  • kiemTra → validate, check
  • xuLy → process
  • capNhat → update
  • them → add
  • xoa → delete
  • luu → save
  • tai → load

Data Nouns

  • dauVao → input
  • dauRa → output
  • duLieu → data
  • thongTin → information
  • ketQua → result

User Interface

  • giaoDien → interface
  • trang → page
  • nut → button
  • bang → table
  • form → form

How It Works

  1. Detection: Extension scans code for variables with Vietnamese characters
  2. Analysis: Uses AST to identify variables (not strings/comments)
  3. Translation: Splits variable name into words and looks up dictionary
  4. Suggestion: Shows English name in rename box

Troubleshooting

Extension not working?

  • Check if file language is supported
  • Ensure variable contains Vietnamese characters
  • Try reloading VSCode

No translation suggestions?

  • Word might not be in dictionary
  • Use Command Palette to see all suggestions

Wrong translation?

  • Extension only translates using fixed dictionary
  • You can edit the name after suggestion

Contributing

If you want to add new words to the dictionary, please create an issue or pull request!

Support

Nếu extension này hữu ích cho bạn, hãy ủng hộ tác giả nhé! 💝

☕ Buy Me a Coffee

Buy me a coffee

💎 Crypto Support

ETH/USDT: 0x3c22A205088609Cc1813e63eA38F7C96a695A3bc (Metamask)

🏦 Bank Transfer (Vietnam)

Techcombank: 6888828882
Account: Nguyen Hoang Tuan Anh

License

MIT License - Free for personal and commercial use.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft