We present a differential forms inspired discretization for variational finite element analysis of inhomogeneous waveguides. The variational expression of the governing equation involves transverse fields only. The conventional discretization with edge elements yields an unsolvable generalized eigenvalue problem since one of the sparse matrix is singular. Inspired by the differential forms where the Hodge operator transforms 1-forms to 2-forms, we propose to discretize the electric and magnetic field with curl-conforming basis functions on the primal and dual grid, and discretize the magnetic flux density and electric displacement field with the divergence-conforming basis functions on the primal and dual grid, respectively. The resultant eigenvalue problem is well-conditioned and easy to solve. The proposed scheme is validated by several numerical examples.